• 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: Unzip multiple items Applescript-terminal syntax help!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unzip multiple items Applescript-terminal syntax help!


  • Subject: Re: Unzip multiple items Applescript-terminal syntax help!
  • From: Axel Luttgens <email@hidden>
  • Date: Fri, 30 Oct 2009 15:25:10 +0100

Le 29 oct. 2009 à 20:34, Cerciello a écrit :

[...]
and back to the other question Axel, yes the integrity of the files and folders appear to be correct as they have icons and works fine. The only exeption are for the aliases which are not resolved. However symlinks are fine. Any idea why?

That's because traditionally, alias files had all relevant info stored in their resource fork. [1]
For example, with an alias created on a Tiger box, I have here:


luttgens$ ls -al somealias somealias/..namedfork/rsrc
-rw-r--r--@ 1 luttgens luttgens 0 30 oct 13:21 somealias
-rw-r--r-- 1 luttgens luttgens 43629 30 oct 13:21 somealias/..namedfork/rsrc


Let's now suppose one has a zip archive of that file, somealias.zip.
When uncompressed with the help of unzip, one ends with two parts:

luttgens$ ls -al somealias __MACOSX/._somealias
-rwxrwxrwx 1 luttgens luttgens 43711 30 oct 14:44 __MACOSX/._somealias
-rwxrwxrwx@ 1 luttgens luttgens 0 30 oct 14:44 somealias


That is, all info now resides in a separate file, ._somealias. [2]
The one that unfortunately gets deleted with the removal of the __MACOSX folder...


This kind of problem may occur not only for resource forks, but for various pieces of metadata as well.

This is why I asked about the provenance of the zipped files.
If they have been created on some Mac OS X box, perhaps a command-line tool such as "ditto" might prove more appropriate.



HTH, Axel


[1] "Traditionally" because it seems that Snow Leopard creates aliases with data in both forks. I guess that this may be related to the new bookmark mechanism.
[2] By making use of a tool such as FixupResourceForks, it is possible to combine both parts back into a single file. _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden
  • Follow-Ups:
    • Re: Unzip multiple items Applescript-terminal syntax help!
      • From: Cerciello <email@hidden>
References: 
 >Unzip multiple items Applescript-terminal syntax help! (From: Cerciello <email@hidden>)
 >Re: Unzip multiple items Applescript-terminal syntax help! (From: Axel Luttgens <email@hidden>)
 >Re: Unzip multiple items Applescript-terminal syntax help! (From: Cerciello <email@hidden>)

  • Prev by Date: Re: fubar in applescript
  • Next by Date: Re: Resolving an alias
  • Previous by thread: Re: Unzip multiple items Applescript-terminal syntax help!
  • Next by thread: Re: Unzip multiple items Applescript-terminal syntax help!
  • Index(es):
    • Date
    • Thread