Batch renaming files in OSX

Discussion in 'Mac Apps and Mac App Store' started by whocares, Mar 3, 2004.

  1. whocares macrumors 65816

    whocares

    Joined:
    Oct 9, 2002
    Location:
    :noitаɔo˩
    #1
    I've got a whole bunch of photos in various subfolders. Some of these photos have the same relative name (ie same file name but in different folders).

    I would like to rename all these files like 000001.ext, 000002.ext etc, independently of file location so I can copy all the files back to one single folder (I can handle that bit in Terminal). There are many sub-folders so I need something recursive.

    I've tried Renamer4Mac, but it isn't recursive. Does anyone know of a different app that would work, or even a terminal command/script/binary that would do the trick?

    Cheers,
    D
     
  2. johnnyjibbs macrumors 68030

    johnnyjibbs

    Joined:
    Sep 18, 2003
    Location:
    London, UK
    #2
    It sounds like an Applescript would do the trick nicely, but unfortunately I'm not familiar with it. Hopefully someone will be able to post a nice little Applescript for this function.
     
  3. Rincewind42 macrumors 6502a

    Rincewind42

    Joined:
    Mar 3, 2003
    Location:
    Orlando, FL
    #3
    Try File Buddy, it does batch renames and more (no, I'm not affiliated, just a long time user :p) You can grab the latest copy here: http://www.skytag.com/
     
  4. whocares thread starter macrumors 65816

    whocares

    Joined:
    Oct 9, 2002
    Location:
    :noitаɔo˩
    #4
    I was looking for something free, the $37 price tag is a bit steep! ;) but thanx anyways.
     
  5. nicely macrumors member

    Joined:
    Jan 12, 2002
    Location:
    Brooklyn, NY - Cobble Hill
    #5
  6. mvc macrumors 6502a

    mvc

    Joined:
    Jul 11, 2003
    Location:
    Outer-Roa
  7. dukemeiser macrumors 6502a

    dukemeiser

    Joined:
    Dec 17, 2002
    Location:
    Iowa
    #7
    Applications -> AppleScript -> Example Scripts -> Finder Scripts should have some AppleScripts you're looking for.
     
  8. whocares thread starter macrumors 65816

    whocares

    Joined:
    Oct 9, 2002
    Location:
    :noitаɔo˩
    #8
    Thanks all. I've downloaded the apps and will take a look at them and the AS tomorrow.

    Cheers,
    D
     
  9. live4ever macrumors 6502a

    Joined:
    Aug 13, 2003
    Location:
    Thunder Bay, ON
    #9
    I like A Better Finder Rename, check it out as well (on Versiontracker).
     
  10. Nuc macrumors 6502a

    Nuc

    Joined:
    Jan 20, 2003
    Location:
    TN
    #10
    This is a good program!

    I second this..great app.
     
  11. tjwett macrumors 68000

    tjwett

    Joined:
    May 6, 2002
    Location:
    Brooklyn, NYC
    #11
    here's another just incase:

    http://www.versiontracker.com/dyn/moreinfo/macosx/21458

    check out http://www.macscripter.net for all your AppleScript needs.

    and here is a very basic script that may do what you want, or you can modify it if you like:

    set items_per_subfolder to 100
    set subfolder_prefix to "subfolder "

    tell application "Finder"
    activate
    set the_folder to (choose folder) as alias
    set {i, j, the_contents} to {1, 1, (items of the_folder)}
    set new_folder to make new folder at the_folder with properties {name:(subfolder_prefix & (j as string))}
    repeat with this_item in the_contents
    if i > items_per_subfolder then
    set {i, j} to {1, (j + 1)}
    set new_folder to make new folder at the_folder with properties {name:(subfolder_prefix & (j as string))}
    end if
    move this_item to new_folder
    set i to i + 1
    end repeat
    beep
    display dialog (((count of the_contents) as string) & " items split into " & (j as string) & " subfolders.") buttons {"OK"} default button 1 with icon 1 giving up after 10
    end tell
     
  12. MrMacMan macrumors 604

    MrMacMan

    Joined:
    Jul 4, 2001
    Location:
    1 Block away from NYC.
    #12
    tjwett -- you have to use the the 'php' feature... your applescrip was messed up by the smily face.
     
  13. tjwett macrumors 68000

    tjwett

    Joined:
    May 6, 2002
    Location:
    Brooklyn, NYC
    #13
    eep :eek: thanks for the heads up. yeah, ummm....i don't think the smilies will add much functionality to the script. sooorry.

    EDIT* and now i can't even figure out how to fix it. humbling indeed. :rolleyes: bahh, just ferget it. im gunna go git destraktid bye sum shynee objeks.
     
  14. NE1956 macrumors newbie

    NE1956

    Joined:
    May 31, 2008
    Location:
    Outside of Boston
    #14

    Absolutely PERFECT solution. This is the FIRST AppleScript I've run on my new Mac. No 3rd party apps necessary.

    Excellent!! ;)
     
  15. chouchou54 macrumors newbie

    Joined:
    Jan 17, 2009
    #15
    Try this java-based rename utility : jRename

    Works great on OS X

    Enjoy !
     
  16. NorCal-Cyclist macrumors newbie

    Joined:
    Jan 18, 2009
    Location:
    Redding, CA
    #18
    +1 for Name Mangler...great for a free app
     
  17. johny5 macrumors 6502a

    johny5

    Joined:
    Mar 31, 2007
    Location:
    UK
    #19
    Agreed, I have been trying to create advanced rules for ages using automator but just had a quick browse through some sample scripts and realise scripts are pretty powerful!

    I dont want to hijack the thread, but is there a book or somewhere to learn about scripts?
     

Share This Page