Apple Script, simple, renaming files

Apple Script, simple, renaming files


Job Description


I'm need a simple Applescript that renames a folder of files. The budget for this project is $18

I will drop a folder of images onto the droplet. The original filenames of the images in the folder will always be the same, sequential numbering. 01.PSD, 02.PSD, 03.PSD etc. However, the amount of images will always be different, there may be up to 50 files in the folder. (The images show a photobook design, the first and last image only show one side, but all other images show two sides of the design). The droplet will rename the images as follows:

01.PSD -> 01.PSD
02.PSD -> 02-03.PSD
03.PSD -> 04-05.PSD
04.PSD -> 06-07.PSD

the last image will be renamed with {(number of image x 2) - 2}, for example :

05.PSD -> 08.PSD
20.PSD -> 38.PSD

Technical requirements:
I would like this needs to be working as a droplet, I drop a folder with images on it, and the files will be renamed automatically
It needs to be working in Mac OS10.4 and later