Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Batch renaming files...

Batch renaming files...
Thread Tools
Gamoe
Mac Elite
Join Date: Sep 2000
Status: Offline
Reply With Quote
Feb 6, 2006, 07:06 AM
 
Hello,

I've been trying to come up with a sensible naming scheme for my photos, which would retain important photo information, such as the date, while at the same time be compatible with UNIX, Linux and even modern Windoze OSs, so as to be as portable as reasonably possible. I don't consider an 8 character limit reasonable, so I am not aiming for full, archaic-PC operating system compatibility either.

There are two parts to this. First off, I want to make sure that there are no illegal characters in my naming scheme, in relation to modern versions of those systems I mentioned. If you have a different suggestion on a naming scheme, feel free to let me know, however, as long as there are no illegal characters I think the following will suit me well:

Gabriel's_Macintosh_Party[26]-[02-24-2006][01-58-18PM][PHO8100]

The first part "Gabriel's_Macintosh_Party" is the series name for the photo. This is optional, and only some photos would contain this strong. The second part "[26]" is the number of the photo within that series, that is, this photo was number 26 of all the photos in the "Gabriel's_Macintosh_Party" series. This, of course, is optional too, as it is dependent on whether it is part of a series or not.

The second part part "[02-24-2006]" is as it appears to be, the date (in month-day-year format). The third part "[01-58-18PM]" is the time (in hour-minutes-seconds-AM/PM format, although I have not yet decided whether 24 hour time would be better) and the last part "[PHT8100]" contains the arbitrary "PHT" tag which I like to use to indicate a photo (versus another image). The number is simply the number the camera gave the image. I would like to keep this number, because I find it useful for some applications.

And, now for the second part to my challenge, if you will: How do I do it?

I've tried to use Automator, and I was able to get a result, but I cannot fine-tune it to exactly how I want it to be. It does not let me choose the [ and ] characters as separators, for instance, but I find them much better for readability than dashes.

I'm thinking this can be done via AppleScript, however, but I don't know how to. I haven't played with AppleScript for a long time, and I never made any serious, complex scripts with it, so I'm not really familiar enough with it to write something that will do this for me. But, I am not limited to AppleScript. The tool doesn't matter much to me, as long as it can get the job done. I've considered the terminal as well, but I am even less familiar with that as a programming/scripting tool.
     
plasticman
Junior Member
Join Date: Mar 2005
Location: UK
Status: Offline
Reply With Quote
Feb 6, 2006, 08:56 AM
 
I use a freeware application called "viewit" but my requirements aren't as complex as yours
     
PrOeliuM
Fresh-Faced Recruit
Join Date: Jul 2005
Status: Offline
Reply With Quote
Feb 7, 2006, 08:47 PM
 
I use a tool called FileWrangler to do my renaming and I think it just might be flexible enough to do what you need.

It's easy to use and free, so give it a shot!
     
Gamoe  (op)
Mac Elite
Join Date: Sep 2000
Status: Offline
Reply With Quote
Feb 10, 2006, 04:17 AM
 
Originally Posted by PrOeliuM
I use a tool called FileWrangler to do my renaming and I think it just might be flexible enough to do what you need.

It's easy to use and free, so give it a shot!
PrOeliuM, thank you very much for the tip! Very good app. Actually, I am not able to use that naming scheme with FileWrangler because of some minor limitations. Basically, it doesn't have enough parts options (that is, it only allows definition of a Prefix, Suffix and Extension, but I have more sets of data in my desired naming scheme, as you can see), and it doesn't let me manipulate text already in the name (I want it to retain the camera-assigned IMG number).

However, I believe these abilities are actually not that difficult to incorporate-- most of the function is there, it just needs to be extended. So, I've sent the author an e-Mail about this, in the hopes that perhaps a future version of this great little app. will have these features.

Meanwhile, I'm still looking for a solution for now.
     
parallax
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Feb 11, 2006, 03:14 PM
 
Gabriel, I would normally suggest a shell script for such an application but if you're unfamiliar with how to interact with UNIX and don't want to learn then that's not the best option.

I think you were on the right track with AppleScript. AppleScript is simple enough that I would just go and learn to program in it if I were you. It won't take more than a few hours of hacking around to find what you need.
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Gamoe  (op)
Mac Elite
Join Date: Sep 2000
Status: Offline
Reply With Quote
Feb 13, 2006, 02:46 PM
 
Originally Posted by parallax
Gabriel, I would normally suggest a shell script for such an application but if you're unfamiliar with how to interact with UNIX and don't want to learn then that's not the best option.
I'm not totally unfamiliar with UNIX. In fact, I do use the terminal for a few things now and then, I know a few commands, and I have Linux box. Sure, I'd like to learn more, but I'd like to accomplish my task sooner rather than later.

Originally Posted by parallax
I think you were on the right track with AppleScript. AppleScript is simple enough that I would just go and learn to program in it if I were you. It won't take more than a few hours of hacking around to find what you need.
AppleScript is a good, relatively easy to learn scripting language, however I wonder if there's much use to learning it now, since there are other scripting languages more widely available on multiple platforms. But, anyway, it doesn't really matter much to me now. What I'd like is to be able to do the batch renaming in the way I'd like, regardless of the tool I use.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:57 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,