Lowercase And Uppercase Nautilus Script Changer For Files Or Folders Names

Share it!!Share on Facebook3Share on Google+0Tweet about this on Twitter3Share on Reddit0Share on StumbleUpon0

Simple and Quick way to easily change filenames or folders to lowercase or uppercase using simple nautilus scripts. These scripts become really handy to easily change lowercase or uppercase to many files or folders at the same time.

Lowercase Script

Create a document file with content below using any text editor “I prefer using nano on terminal”

To nautilus scripts directory

~/.gnome2/nautilus-scripts

Script

#!/bin/sh
# lowercase: Changes input to lowercase.
for arg
do
tmp=`echo "$arg" | tr '[A-Z]' '[a-z]'`

if [ -f $tmp ]
then
msg="Lowercase filename: '$tmp' already exists."
gdialog --msgbox "$msg" 100 100
else
mv "$arg" "$tmp"
fi
done

Uppercase Script

create a document to same directory mention up there with this content below.

Script

#!/bin/sh
# uppercase: Renames input file to uppercase.
for arg
do
tmp=`echo "$arg" | tr '[a-z]' '[A-Z]'`

if [ -f $tmp ]
then
msg="Uppercase filename: '$tmp' already exists."
gdialog --msgbox "$msg" 100 100
else
mv "$arg" "$tmp"
fi
done

How To Make nautilus script executable

run terminal

chmod a+x filename
Share it!!Share on Facebook3Share on Google+0Tweet about this on Twitter3Share on Reddit0Share on StumbleUpon0

Add a Comment

Your email address will not be published. Required fields are marked *