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
# 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
# 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

