Rename Folder full of Images from Text File List

mfuse

Registered
I want to rename a folder full of files from a list.

I had a friend create a shell script, but it doesn't work. He created it for the "ksh" and of cource the Mac doesn't have it.

Here is the script:

#! /bin/sh
IFS=","
cd images
while read ID OLDNAME NEWNAME JUNK ; do
    echo -n "Renaming $OLDNAME to $NEWNAME..."
    mv $OLDNAME $NEWNAME
    echo
done < /list.txt

I made a change and am using "sh" but am getting a
"name_file.sh: can't open input file: name_file.sh"
message.

Anyone have a fix?
 
Back
Top