Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

moosh7

macrumors newbie
Original poster
Dec 5, 2008
2
0
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

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.