Re: Photo List - again
Re: Photo List - again
- Subject: Re: Photo List - again
- From: Paul Skinner <email@hidden>
- Date: Thu, 06 Sep 2001 11:47:10 -0400
on 9/6/01 10:19 AM, email@hidden wrote:
>
Hi -
>
Thanks to all who tried to help me.
>
>
When I sent this originally I guess I really didn't explain the problem
>
correctly.
>
All of the photos have different names and numbers, so making a list of the
>
thousands of names inside the script would not be practical. Somehow the
>
script must pick up the first name of the photo (variable in length), and
>
move it to the end of the line.
>
>
Oh yes, I did have an error in the first list I sent. That made it real
>
confusing. Sorry.
>
>
This is an example of what I have:
>
>
Background Sky 00659.jpg
>
Sunset 00660.jpg
>
Clouds 00664.jpg
>
Sunshine 00665.jpg
>
>
This is an example of what I need:
>
>
00659.jpg Background Sky
>
00660.jpg Sunset
>
00664.jpg Clouds
>
00665.jpg Sunshine
>
>
I have made a correct list in FMP, but I also need to change the name of the
>
actual photo.
>
All my attempts have failed miserably, anybody want to try again?
>
>
- - Les
This is the same script I posted yesterday, except that it allows you to
choose the folder containing the files to process.
--begin script
set fileList to list folder (choose folder with prompt "Where are the files
man?") as text
repeat with thisName in fileList
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 & ".jpg " & fileName
end repeat
--end script
--
"A little inaccuracy sometimes saves tons of explanation."
-- H. H. Munro (Saki)