Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do shell script woes



On Dec 24, 2003, at 9:21 PM, Lorin Rivers wrote:

This simple shell command works swimmingly from the command line in Panther, yet does nothing when called from my AppleScript.

set this_path to "/Users/lrivers/Desktop/cabs/06369022.cab"
--try
do shell script "/sw/bin/cabextract " & this_path

Suggestions?



BTW, .cab files are Windows archive files, typically OS related or in any case, coming from Microsoft. I wanted to write a little utility for extracting them because MS provides quite a few Office templates in that format. Alas...

Here's what I ended up doing. It was practically instantaneous. I'd still like to understand why it doesn't work from do shell script, but hey. The tech note practically says "don't expect do shell script to work".

find + -exec is immensely powerful but so is dynamite...

(in the directory containing the .cab files)
sh> find . -name "*.cab" -exec cabextract -q {} \;

--
There is no kind of dishonesty into which otherwise good people more easily and frequently fall than that of defrauding the government. - Benjamin Franklin, statesman, author, and inventor (1706-1790)
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
References: 
 >do shell script woes (From: Lorin Rivers <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.