Re: Finder can't find
Re: Finder can't find
- Subject: Re: Finder can't find
- From: Michelle Steiner <email@hidden>
- Date: Tue, 15 Apr 2003 00:40:17 -0700
On Tuesday, April 15, 2003, at 12:08 AM, Sovereign Diamonds wrote:
repeat with x in FileContent
set OldName to first item of text items of x
set NewName to last item of text items of x
tell application "Finder" to set name of (((FolderOfImages as
string) &
OldName) as alias) to NewName
end repeat
Have you made sure that there actually is a file that matches OldName
in the folder? Keep in mind that if the files do not show extensions,
the extensions are still part of the file name, and if the text file
does not include the extension, you won't get a match. Conversely, if
the file names really don't have extensions, but the text file contains
the extensions, you won't have a match.
BTW, instead of "first item of text items of x" you can use "first text
item of x"; it won't solve your immediate problem, but it is cleaner
code.
--Michelle
--
Velveeta is to American cheese as American cheese is to cheese
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.