• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Finding differences in 2 folders
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Finding differences in 2 folders
      • From: wemedge <email@hidden>
References: 
 >Re: Finding differences in 2 folders (From: AppleScript Guru <email@hidden>)

  • Prev by Date: Re: Making JPEG thumbnails of PDF files
  • Next by Date: Tex-Edit, Paste clipboard?
  • Previous by thread: Re: Finding differences in 2 folders
  • Next by thread: Re: Finding differences in 2 folders
  • Index(es):
    • Date
    • Thread