Creating Zip file via Create Archive
Creating Zip file via Create Archive
- Subject: Creating Zip file via Create Archive
- From: Rosemary Cantrell <email@hidden>
- Date: Mon, 23 Feb 2009 15:38:30 -0600
I'm a novice at scripting and am trying to either applescript or automate the following:
I want to be able to either drop into a folder (utilizing folder action script) or drop on an automator application a folder that will zip the contained PDFs into a .zip file. Or when I drop individual PDFs into it and create single zip files for each pdf. Using the name of the original folder or file to name it.
Using Automator I was able to create an app that I could do this, but it wants to name the file archive or "whatever I put in the name field" I want it to use the name from the original. I tried *.* thinking I've seen this on the PC side. But then I just got an archive zip with the name *.*.zip ...
So I tried modifying a script I already have that creates PDFs of single indd files. I'm at the part where I'm trying to tell it create the archive. I've searched the finder and system library and can't find the create archive command so I tried just guessing and am getting a Syntax Error Expected end of line, etc. but found identifier. and it points to this_image after the word Archive (my guess command).
tell application "Finder"
launch -- always use with Folder Actions
set this_image to open file (source_file as string)
Archive this_image to target_path end tell
end timeout
So my questions are:
1) Can anyone who is automator savy tell me if I can get it to keep the name of the original file?
2) If AS, can you tell me what the proper way is to tell it create archive like it does when you right click on a folder and choose create archive?
3) Is there a better way to do this that I'm not thinking of?
Basically I have frequently a couple dozen folders containing pdfs for each file that I'd like to batch process. And also zip single PDFs are welll. I could have two different drop folders if that would be preferable.
Thanks!
Rosie
_______________________________________________
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