Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A simple tip to help when renaming many files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A simple tip to help when renaming many files
Authored by: lar3ry on Dec 12, '07 08:06:45AM

I find the Finder to be a pretty suboptimal tool for renaming more than a single file.

I use a Perl script to do batch renaming for me. This requires the command line, but I'm not afraid of Terminal or iTerm.

What the script does is collect the file names from the command line and opens up a text editor with a file with the names in it, one file name per line. When the editor closes, the script checks the file against the original list, and where the names differ, it renames the file for me. Simple and to the point and allows me to do sophisticated search/replace, etc. using the text editor and there's no problem handling file names with spaces, which are common on the Mac.

As I said, this requires the use of the command line. Perhaps an equivalent AppleScript could be written to do the same thing (turn it into an Automator action or whatever) for those of you that are afraid of (or just don't want to use) Terminal...



[ Reply to This | # ]
A simple tip to help when renaming many files
Authored by: fracai on Dec 12, '07 09:37:50AM

I've got my own script for regular expression renaming (it pipes filenames through sed), but I'd love to see the script you're using. I often have a file containing the names of files as they need to end up and to just paste these into another to execute the change would be great.

Please post your work.

---
i am jack's amusing sig file



[ Reply to This | # ]
Perl file name changer
Authored by: jecwobble on Dec 12, '07 10:07:52AM

I like the sound of this, too. I'd love to give it a try if you don't mind posting it. In fact, if I were you, I'd submit it as a full-fledged hint.



[ Reply to This | # ]
A simple tip to help when renaming many files
Authored by: neuralstatic on Dec 12, '07 11:15:00AM

i know CL guys aren't into it, but for you gui folks:
i think the simplest and freest thing around is "Renamer4Mac.app" i've used it for just about everything, search & replace, trim, serialize...



[ Reply to This | # ]