Hi guys and Gals,
Can any one help me here? Im totally new at this and am trying to modifie a Script to fit my purposes but currently i’ve hit a wall!!
What I want to do
Select a folder which contains numbered .jpegs. Rename the jpegs to the months of the year. I.e so that 1=Jan, 2=Feb, 3=Mar, 12=Dec, etc etc, and then loops around when it reaches 13, i.e 13=Jan 14=Feb 24=Dec etc.
What I have got so far
try
tell application "Finder" to set the inputFolder to (choose folder) as alias
on error -- no open folder windows
set the source_folder to path to desktop folder as alias
end try
tell application "Finder"
-- get the current folder listing
set sourceFiles to every file of inputFolder
-- start off with file 1
display dialog "Start with what number?" default answer "1"
set fileCounter to text returned of result as number
--loop through the files
repeat with aFile in sourceFiles
--renaming each one in turn
set name of aFile to (month & ".jpg") as string
-- and incrementing the counter after each file
set fileCounter to fileCounter + 1
end repeat
end tell
Any ideas?? I’m a bit simple could any suggestions be explained in laymens terms!
Cheers for taking the time to read this post.
TimP
Model: G4 733 Quicksilver
AppleScript: 1.9.3
Browser: Safari 312
Operating System: Mac OS X (10.3.9)