file list with Finder
file list with Finder
- Subject: file list with Finder
- From: Gakuji Ohtori <email@hidden>
- Date: Sat, 12 Oct 2002 13:49:24 +0900
The following script returns {} when theFolder does not contain any
files:
set theFolder to choose folder
tell application "Finder"
files in theFolder
end tell
But the following script generates an error when theFolder does not
contain any files:
set theFolder to choose folder
tell application "Finder"
files in (entire contents of theFolder)
end tell
Is this a spec or a bug of Finder? I want the second script to return
{}.
One workaround is to use "as list" such as
set theFolder to choose folder
tell application "Finder"
files in (entire contents of theFolder as list)
end tell
but the following script returns {} without specifying "as list":
set theFolder to choose folder
tell application "Finder"
entire contents of theFolder
end tell
I'm using Mac OS X 10.2.
Gaji
_______________________________________________
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.