Change the name of photos

Hi,

I have a folder with photos inside and i just want to change or introduce a beggining code in the filename and don’t do anything else, can anyone help me?

Thanks, Mario.

i think automater will do that

but

do shell script "
PREFIX="PHOTO-";
cd /Photos/folder/

for file in *;
do
    mv $file $PREFIX$file;
done
"

The “AppleScript way” would be like this:


tell application "Finder"
	set photos to files of entire contents of (choose folder) -- entire contents digs down through internal folders
	set prefix to "myPrefix" -- entirely optional.
	repeat with aPhoto in photos -- run through the files and change their names
		set newName to prefix & "-" & name of aPhoto -- stick a dash between the prefix and the old name
		set name of aPhoto to newName -- do it
	end repeat
end tell

Remember, that if you choose this folder again, you’ll end up with “prefix-prefix-OldName.jpg”; not useful unless you want that.