Re: Unzip multiple items Applescript-terminal syntax help!
Re: Unzip multiple items Applescript-terminal syntax help!
- Subject: Re: Unzip multiple items Applescript-terminal syntax help!
- From: Cerciello <email@hidden>
- Date: Thu, 29 Oct 2009 12:46:19 +0100
Hi,
yes Steve suggestion is working a part for the last line " & rm -rf
__MACOSX; " which basically supposed to delete the __MACOSX folder
created . . . I don't know why! and Axel is right with the "&" that
precedes the "rm -rf __MACOSX" part; been wrong. So if I split the to
line like this all work as expected:
on run {input, parameters}
tell application "Finder"
set this_path to the quoted form of the POSIX path of (insertion
location as alias)
end tell
tell application "Terminal"
do shell script ("cd " & this_path & "; find . -exec unzip -o {} \\;")
end tell
tell application "Terminal"
do shell script ("cd " & this_path & "; rm -rf __MACOSX;")
end tell
return input
end run
Any suggestion on how to combine this 2 lines in one "do shell scrip"
command?
The idea to create this service is for unzipping large files
downloaded from the net which often are splitted in hundreds of small
zip files. Usually I will run the service on a folder on my desktop.
Thanks allot to all for you help.
On Oct 29, 2009, at 10:38 AM, Axel Luttgens wrote:
Le 28 oct. 2009 à 22:47, Cerciello a écrit :
[...]
do script "cd " & this_path & find . -exec unzip -o {} \; & rm -
rf __MACOSX;
[...]
Hello,
Emmanuel and Steve already provided you with useful suggestions.
I still feel uncomfortable with the "&" that precedes the "rm -rf
__MACOSX" part; what is it supposed to do here?
On the other hand, are you unzipping on a FAT volume? what's the
provenance of the zipped files?
More generally, which command(s) exactly do you type in Terminal.app
when unzipping by hand the files contained in a folder?
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
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