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

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

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

    iShater

    Joined:
    Aug 13, 2002
    Location:
    Chicagoland
    #2
    Are those two different bat files? cause the 2nd code block reverses what the first one does.
     
  3. thread starter macrumors newbie

    Joined:
    Jun 26, 2009
    #3
    Yes, they are. Sorry I didn't specify.
     
  4. Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    Instead of rename, use mv.
     
  5. thread starter macrumors newbie

    Joined:
    Jun 26, 2009
    #5
    Is the period part of the code or just a period? :p
     
  6. Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #6
    It's just a period. mv short for move.
     
  7. macrumors member

    Joined:
    Jun 26, 2009
    #7
    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

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #8
    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,
    Code:
    do shell script "mv old.name new.name"
     
  9. macrumors 601

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #9
    Is that the entire code? Because if so it hardly seems worth scripting...
     

Share This Page