• 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: Compare files for 'find duplicates' script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compare files for 'find duplicates' script


  • Subject: Re: Compare files for 'find duplicates' script
  • From: Emmanuel <email@hidden>
  • Date: Mon, 21 Nov 2005 23:37:55 +0100

At 4:51 PM +0000 11/21/05, pete boardman wrote:
I'm trying to write a 'find duplicates' script (couldn't find an easier solution out there).

You've got to do like Doug says, comparing the /rsrc files, here is a variante.

You know how to compare the data fork: with diff, for instance.

Now what you need is to get the contents of the resource fork - then you will use diff again with the resource forks.

This provides the contents of the resource fork of a file f (assuming f is alias "path:to:file"):

set fx to posix path of f
set fxr to fx & "/rsrc"
set ResourceFork to do shell script "cat " & quoted form of fxr

That said, I think you will still be missing one byte:

set fx to posix path of f
set fxr to fx & "/rsrc"
size of (info for f) - (length of (read f)) - (length of (do shell script "cat " & quoted form of fxr))
-- 1


Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Compare files for 'find duplicates' script
      • From: pete boardman <email@hidden>
References: 
 >Compare files for 'find duplicates' script (From: pete boardman <email@hidden>)

  • Prev by Date: [ann] TextCommands 1.0.0
  • Next by Date: Re: Compare files for 'find duplicates' script
  • Previous by thread: Re: Compare files for 'find duplicates' script
  • Next by thread: Re: Compare files for 'find duplicates' script
  • Index(es):
    • Date
    • Thread