Re: Zip and keep folder structure
Re: Zip and keep folder structure
- Subject: Re: Zip and keep folder structure
- From: Doug McNutt <email@hidden>
- Date: Tue, 8 Dec 2009 13:16:10 -0700
At 13:49 -0600 12/8/09, Rosemary Cantrell wrote:
>OK that works much better, but now when I unstuff it starts with the
>user folder / username folder / desktop folder / folderIwant folder
>with contents correct. The first 3 are not needed and might cause
>confusion.
>
>I'm thinking I need to find out the ins and outs of the do shell
>script "zip -r" better.
>
>Tell me this, is the do shell script doing the same thing as when I
>right click and send to archive? Would I be smarter to approach this
>entirely different? Leave my script that works for the PDFs alone and
>try to create a separate script to do the zipping of a folder with
>it's content hierarchy intact? What if I used the Automator dealie
>would that work better?
You should be aware of the UNIX way which has been around since before the Mac 128. The tool is tar, for tape archive. Without doing any compression tar collects the contents of directories and their subdirectories in a way that was originally optimized for writing a magnetic tape from which scarce memory can be reloaded when necessary.
These days tar has grown and it now supports gzip and perhaps zip itself depending on patent status. Open source software is typically delivered as a *.tar.gz file. The tar tool is available by do shell script and it will actually compress using gzip if you ask.
But the options to tar are a bit challenging. "man tar" tells all. There are probably web sites that will interpret the man page for you.
--
--> A fair tax is one that you pay but I don't <--
_______________________________________________
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