Re: Files of folder returns 0 ...
Re: Files of folder returns 0 ...
- Subject: Re: Files of folder returns 0 ...
- From: Timothy Bates <email@hidden>
- Date: Thu, 07 Feb 2002 11:41:47 +1100
Tried to fix the script by adding brackets to something that shouldn't need
brackets and, it turns out, doesn't)
tell application "Finder"
repeat with f in (files of folder "amygdala:Pictures:needfixing:")
set oldName to name of f as string
...
end
end
Run it and the result is ...
Script 3fix extensions2 started
tell application "Finder"
count every file of folder "amygdala:Pictures:needfixing:"
--> 0
end tell
Script 3fix extensions2 finished
So this is already non-OS9 compatible behaviour.
Then add the "get" coercion and it now works: But this is not needed under
OS9 AFAIK. And it is ugly. Your brain can no longer read the line as
"repeat with x in list" it has to do a reflexive parsing of
"repeat with x in (get a list)"
This is not necessary. So it is a limitation, if not a bug in the strict
sense of the word, IMHO.
Tim
_______________________________________________
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.