Odd behavior with 'set to every file whose'
Odd behavior with 'set to every file whose'
- Subject: Odd behavior with 'set to every file whose'
- From: email@hidden
- Date: Sat, 10 Aug 2002 00:25:47 EDT
tell application "Finder"
-- note: path name ends in colon, which indicates folder
set FolderToBeWorked to "Mac HD:Some Path:SomeFolder:"
-- following results in a list of files, sans path, which
-- are contained in the folder referenced above, including
-- all top level folders, but not the contents of subfolders...
set ListOFiles to list folder FolderToBeWorked
-- use recursion to get contents of each subfolder.
end tell
Or, perhaps just omit the whole what's my alias issue:
set sD to SourceDirectory as alias
Tell app "Finder" to set fileList to (every file in (sD)) as list
As for the creator code, try using "XPR3" rather than
"QXP3" and see what results you get. Or go after it via
type code instead ("XDOC"). At least that's the codes
my system shows for QXpress 3/4/5 documents.
Best Wishes
=-= Marc Glasgow
>
>
Tell application "Finder" to set fileList to (every file in
>
(sourceDirectory as alias) ) as alias list
>
>
The problem is that every now and then it claims that I get
>
an error -2763, "No result was returned from some part of
>
this expression." The highlighted bit when this error
>
shows up is the 'alias list'. This happens between runs
>
with no change in the script code.
>
>
The other question, while you're here, is how I can just
>
get a list of all the Quark Files (file creator "QXP3").
>
I've tried a few things with the whose clause, but nothing
>
that seems to actually work. I keep getting empty lists.
>
That one is probably just something dumb on my part.
_______________________________________________
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.