PDA

View Full Version : Rename Files off other filenames




moosh7
Dec 5, 2008, 09:40 AM
All,

I am totally a newbie to mac programming and macs in general as well. What I am trying to do is to change 1 filename, by copying and pasting another file name, and then appending something to the end.

So the source is
File1.mp3 is the source name
I and to pick a target file, copy the "File1.mp3" + .asd (append this) and have this be the name of the target file.

Anybody have any idea how I can do this? or if there is any utility that can do this?



lee1210
Dec 5, 2008, 10:04 AM
Save the following as renamator.sh:
mv $2 $1.asd

From the terminal, run:
chmod 700 renamator.sh

then to use it, run:
renamator.sh UseThisName.mp3 FileToRename.xxx

The result will be that FileToRename.xxx will be renamed to UseThisName.mp3.asd.

-Lee

moosh7
Dec 8, 2008, 09:22 PM
I will give this a try