Looking for someone to help me convert a short .bat file to AppleScript

Discussion in 'Mac Programming' started by Grahf, Jun 26, 2009.

  1. macrumors newbie

    I'm not very savy in programming, but its a relatively short code so hopefully someone can help me out. Anyways:

    rename sonny-2.swf sonny-2-ver-2-2.swf
    rename sonny-2-ver-1-1.swf sonny-2.swf
    rename sonny-2.swf sonny-2-ver-1-1.swf
    rename sonny-2-ver-2-2.swf sonny-2.swf
  2. macrumors 604


    Are those two different bat files? cause the 2nd code block reverses what the first one does.
  3. macrumors newbie

    Yes, they are. Sorry I didn't specify.
  4. Moderator emeritus


    Instead of rename, use mv.
  5. macrumors newbie

    Is the period part of the code or just a period? :p
  6. Moderator emeritus


    It's just a period. mv short for move.
  7. macrumors member

    you can find an example of what you need directy in the AppleScript's Examples Script folder in your Applications/AppleScript/Example Scripts/Finder Scripts directory.
  8. Moderator emeritus


    I apparently missed the last word of the title on this thread. The mv command I gave is for the command line, but can be used in AppleScript as well doing like so,
    do shell script "mv old.name new.name"
  9. macrumors 601


    Is that the entire code? Because if so it hardly seems worth scripting...

Share This Page