how do I write a shell script to batch rename files in a directory?
From:
Tony Zanella
Subject:
how do I write a shell script to batch rename files in a directory?
Date:
Fri, 29 Aug 2008 16:34:53 -0400
Hello all,
I have a directory listing of files like:
img.bc03.547.1.gif?
I need to trim the last character off for each file in the dir.
I know I can use:
mv img.bc03.547.1.gif? img.bc03.547.1.gif
to rename each by hand, but I want to do this as a batch.
I know it would start with:
for files in *; do;
after that, I'm stuck!
Any suggestions?