Re: Zip Multiple File Headaches
Re: Zip Multiple File Headaches
- Subject: Re: Zip Multiple File Headaches
- From: Doug McNutt <email@hidden>
- Date: Thu, 16 Aug 2007 11:28:27 -0600
At 13:00 -0400 8/16/07, Rick Dwyer wrote:
>I had a simple applescript using the shell script zip function to zip a file for me.
>It worked fine. However, I have modified it to zip multiple files, which it does, but it places them in a folder. For my application, when the zip file is opened, it needs to return just the three files within it, and not have them nested within a folder. Is there a way this can be done?
>Here is my code:
>
>tell application "Finder"
> set zipfolder to ("/TempUploads/mynewzip.zip")
> set filelist to every text item in the folder "Macintosh HD:TempUploads"
> set ToBeZippedFile to ("/TempUploads/" & filelist)
> do shell script "zip -r -j " & zipfolder & " " & ToBeZippedFile & ""
>end tell
Have a look at the gzip and gunzip man pages. On my Mac - Panther - there isn't even a man page for zip though it does exist in /usr/bin/.
tar and then zip is the UNIX way but I think that's not what you want.
--
--> From the U S of A, the only socialist country that refuses to admit it. <--
_______________________________________________
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