Rename Files off other filenames

Discussion in 'Mac Programming' started by moosh7, Dec 5, 2008.

  1. moosh7 macrumors newbie

    Dec 5, 2008

    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?
  2. lee1210 macrumors 68040


    Jan 10, 2005
    Dallas, TX
    Save the following as
    mv $2 $1.asd

    From the terminal, run:
    chmod 700

    then to use it, run: UseThisName.mp3

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

  3. moosh7 thread starter macrumors newbie

    Dec 5, 2008

Share This Page