Re: Is-it a bug in the finder ?
Re: Is-it a bug in the finder ?
- Subject: Re: Is-it a bug in the finder ?
- From: John Delacour <email@hidden>
- Date: Mon, 25 Nov 2002 22:23:19 +0000
- Mac-eudora-version: 5.3a9
At 8:49 am -0800 25/11/02, Syllas R. wrote:
The following script should compare the contents of a source folder to the
one of a target folder and stores the difference in a variable
----- START ------
tell application "Finder"
set SourceFolder to folder "LocalDisk:Desktop Folder:00002 Destination:"
set TargetFolder to folder "VolumeA:00002 Destination:"
set TargetList to name of (every folder) of TargetFolder
set DifSource to (((every folder) of SourceFolder) whose name is not in
TargetList)
display dialog number of items of DifSource
end tell
It works here with 10.2 and AS 1.8.3, but you may be confusing things
with all those unnecessary brackets. How did it look in your (very
useful) Event Log? Try something leaner like this, which also works:
tell app "Finder"
set SourceFolder to folder "Source" of (path to "cusr")
(* contains a, b *)
set TargetFolder to folder "Target" of (path to "cusr")
(* contains a, b, c, d, e *)
set TargetList to name of folders in TargetFolder
--> {"a", "c", "d", "e"}
set DifSource to folders in SourceFolder whose name is not in TargetList
--> {folder "b" of folder "Source" of folder "jd" of folder
--> "Users" of startup disk of application "Finder"}
end
_______________________________________________
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.