Re: Finding differences in 2 folders
Re: Finding differences in 2 folders
- Subject: Re: Finding differences in 2 folders
- From: Ian Hewitt <email@hidden>
- Date: Wed, 10 Oct 2001 10:31:10 -0400
On 10/6/01 12:05 AM, "AppleScript Guru" <email@hidden> wrote:
>
on 10/5/01 9:52 AM, you said:
>
>
> Does anyone know of a script that will take 2 folders and display the names
>
> of the unique files in each?
>
>
Try this...
>
>
set folder1 to (choose folder) as string
>
set folder2 to (choose folder) as string
>
>
set folder1List to list folder folder1 without invisibles
>
set folder2list to list folder folder2 without invisibles
>
>
set folder1UniqueList to {}
>
set folder2UniqueList to {}
>
>
repeat with a from 1 to (count folder1List)
>
set cFolderItem to item a of folder1List
>
if folder2list does not contain cFolderItem then set end of
>
folder1UniqueList to cFolderItem
>
end repeat
>
>
repeat with a from 1 to (count folder2list)
>
set cFolderItem to item a of folder2list
>
if folder1List does not contain cFolderItem then set end of
>
folder2UniqueList to cFolderItem
>
end repeat
>
>
{folder1UniqueList, folder2UniqueList}
This solution did the trick very well in OS 9, though ran into a problem on
line 3 in OS X. The debugger in Script Debugger had problems with "list
folder folder1" - any ideas?
Thanks much,
Ian Hewitt