Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DesertStorm

macrumors newbie
Original poster
Oct 14, 2011
2
0
Hi, guys.

I have a little problem to solve with AppleScrip and counting on your help. It is all about batch renaming files, but with a twist :p

How do you write a folder action script so that it would rename the file you put in it to a set of numbers (something like 0001 but without changing its file extension) and did it sequentially, i.e. so that if you already have the 0001 file in there, the next file would be named 0002 and so on.

I have some experience in programming but am a total noob in AppleScript, so even some guidelines would help.

Thanks!
 
Last edited:
OK, correct me if I'm wrong, but the general scheme would look something like that:

1. Check for adding an item to the destination folder
2. Count the number of files in the destination folder
3. Change the name of the item being added to "the number of files in the destination folder" + 1

Any suggestions?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.