Re: Compress contents of folder using parent folder as zip name
Re: Compress contents of folder using parent folder as zip name
- Subject: Re: Compress contents of folder using parent folder as zip name
- From: Jenni via AppleScript-Users <email@hidden>
- Date: Sat, 18 Sep 2021 21:01:26 -0700
> On Sep 18, 2021, at 6:30 AM, James Yanchak <email@hidden> wrote:
>
> The zipFile value is the full path, this is why you are getting all those
> folders. In the shell command, change directory to the folder just before the
> zip command and use relative locations like this:
>
> do shell script "cd " & theFolder & "; zip -r " & fileName & ".zip " &
> fileName
Thanks, James. That did it.
> You might want to look into using the ditto command instead of zip. It's been
> years but the last time I looked into this, if I am remembering correctly,
> zip did not preserve certain Mac/Finder information:
>
> ditto -c -k --sequesterRsrc --keepParent src_directory archive.zip
Thanks for this, Jim. I actually like this better than Zip because it
doesn't require cd-ing into the folder.
Marc
_______________________________________________
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