• 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: Using the 'Create Archive' - File Menu Command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using the 'Create Archive' - File Menu Command


  • Subject: Re: Using the 'Create Archive' - File Menu Command
  • From: KOENIG Yvan <email@hidden>
  • Date: Tue, 24 Apr 2007 17:35:53 +0200

Le 24 avr. 07 à 17:26:49, KOENIG Yvan a écrit :
…


Hello

I got the tip some months ago on a forum:

set a_Folder to "Macintosh HD:Users:yvankoenig:Desktop:ƒ dates ƒ:AW_panther.pdf"
-- ... In the body of your script ...set aFolder to a_Folder as alias
-- This folder must existset myZippedPath to fileZipper(aFolder)
-- myZippedPath is now the path to the zipped file.
-- ... After the body of your script ...
-- File Zipper-- Creates zipped file in same folder-- Pass file/folder path to this handler-- Returns path to zipped fileon fileZipper(myFile)
if (myFile as text) ends with ":" then set myFile to text 1 thru -2 of (myFile as text)

set zipFile to (myFile & ".zip") as text
do shell script "/usr/bin/ditto -c -k -rsrc --keepParent " & (quoted form of (POSIX path of myFile)) & " " & (quoted form of (POSIX path of zipFile))
return zipFile

end fileZipper

Yvan KOENIG


Oops, something clobbered the message ;-((


set a_Folder to "Macintosh HD:Users:yvankoenig:Desktop:ƒ dates ƒ:AW_panther.pdf"
-- ... In the body of your script ...
set aFolder to a_Folder as alias
-- This folder must exist
set myZippedPath to fileZipper(aFolder)
-- myZippedPath is now the path to the zipped file.
-- ... After the body of your script ...
-- File Zipper
-- Creates zipped file in same folder
-- Pass file/folder path to this handler
-- Returns path to zipped file
on fileZipper(myFile)
if (myFile as text) ends with ":" then set myFile to text 1 thru -2 of (myFile as text)
set zipFile to (myFile & ".zip") as text
do shell script "/usr/bin/ditto -c -k -rsrc --keepParent " & (quoted form of (POSIX path of myFile)) & " " & (quoted form of (POSIX path of zipFile))
return zipFile

end fileZipper

Yvan KOENIG

 _______________________________________________
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

  • Prev by Date: Re: Script to replace lost file extension
  • Next by Date: Re: Using the 'Create Archive' - File Menu Command
  • Previous by thread: Re: Using the 'Create Archive' - File Menu Command
  • Next by thread: Checking for modal dialog in app
  • Index(es):
    • Date
    • Thread