• 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: Compress contents of folder using parent folder as zip name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compress contents of folder using parent folder as zip name


  • Subject: Re: Compress contents of folder using parent folder as zip name
  • From: James Yanchak via AppleScript-Users <email@hidden>
  • Date: Sat, 18 Sep 2021 09:30:24 -0400

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


> On Sep 17, 2021, at 21:37, Jenni via AppleScript-Users
> <email@hidden> wrote:
>
>       Forgot to mention that I’m running 10.15.7.
>
>       Also, adding -j to the zip command errors out because there are
> multiple files with the same name in the directories I want to compress.
>
> 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

 _______________________________________________
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: Compress contents of folder using parent folder as zip name
      • From: Jenni via AppleScript-Users <email@hidden>
References: 
 >Compress contents of folder using parent folder as zip name (From: Jenni via AppleScript-Users <email@hidden>)
 >Re: Compress contents of folder using parent folder as zip name (From: Jenni via AppleScript-Users <email@hidden>)

  • Prev by Date: Re: Compress contents of folder using parent folder as zip name
  • Next by Date: Re: Compress contents of folder using parent folder as zip name
  • Previous by thread: Re: Compress contents of folder using parent folder as zip name
  • Next by thread: Re: Compress contents of folder using parent folder as zip name
  • Index(es):
    • Date
    • Thread