Re: command line ZIPping UNZIPping syntax
Re: command line ZIPping UNZIPping syntax
- Subject: Re: command line ZIPping UNZIPping syntax
- From: Courtney Schwartz <email@hidden>
- Date: Fri, 4 Feb 2005 12:59:47 -0500
Jake,
There are a few ways you can deal with the resource forks (a part of
the HFS+ file system on Macs with the Finder info etc. you were
describing).
Ditto is good for copying while preserving resource forks, as you've
discovered. Things get a little more complex when you want to create an
actual compressed archive. Standard ZIP files do not normally account
for resource forks, since most other file systems (CDs (ISO 9660),
FAT32, NTFS, EXT2) don't use them.
Back when I was trying to handle this stuff, I found the following
pages useful:
+ Experiment on what does and does not preserve a resource fork:
http://sean.typepad.com/ditto/2004/07/mac_os_x_resour.html
+ Creating HFS-aware (having resource fork areas) ZIP archives:
http://www.macosxhints.com/article.php?story=20031118111144197
+ If you are doing frequent large backups, particularly over a network,
ditto is not as efficient as rsync, provided you can afford to lose the
resource fork: http://www.jdmz.net/ssh/
By the way, if you're curious about those __MACOSX folders, I think
they basically are a way of keeping the resource fork info on file
systems that don't handle it natively, like burnt CDs... With some
extra shell script ninjas you could use those to put the resource forks
pack on their files should they become disconnected.
Courtney Schwartz
On Feb 4, 2005, at 11:15 AM, Jake Pietrykowski wrote:
Hi,
As part of a script I want to ZIP and UNZIP files and directories. I'm
currently using the ditto command to create the archives, and the unzip
command to unzip, each preceded by do shell script.
forgive the lack of technical jargon below ;-)
I know there are endless possibilities to working with archives, but
what I
need is a way to KEEP all of the Finder info, custom icons, labels,
etc.
Permissions are not essential to keep. I need to create an archive like
such, and then in turn, be able to also extract the archive.
--current ZIP script
do shell script "ditto -c -k -rsrc --keepParent /path/to/files
/path/to/archive.zip"
--current UNZIP script
do shell script "unzip /path/to/archive.zip -d /path/to/desktop"
Using the 'unzip' command, also renders an extra __MACOSX folder.
Thanks for any insight.
Regards,
Jake
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
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