Re: Change Photo Name
Re: Change Photo Name
- Subject: Re: Change Photo Name
- From: Paul Skinner <email@hidden>
- Date: Wed, 12 Sep 2001 14:51:24 -0400
on 9/11/01 3:19 PM, email@hidden wrote:
>
Thanks to Paul Skinner and all the others who responded to my initial cry for
>
help. I now have a script that ALMOST works. It will give the correct RESULT,
>
but it will not actually change the name of the photo in the folder. Sure
>
could use a little more help.
Sorry, I should have followed through when I sent the first version.
--begin script
set text item delimiters to ""
set sourceFolder to (choose folder with prompt "Where are the files man?")
set fileList to list folder sourceFolder as text
repeat with thisName in fileList
set originalname to thisName as text
set text item delimiters to "."
set thisName to item 1 of every text item of thisName
set text item delimiters to " "
set fileNumber to text item -1 of thisName
set text item delimiters to ""
set fileName to characters 1 thru -((length of fileNumber) + 2) of
thisName as text
set newName to fileNumber & " " & fileName & ".jpg "
tell application "Finder"
set name of file ((sourceFolder as text) & originalname) to newName
end tell
end repeat
--end script
--
Translucent Oscillating Aoxomoxoa