Narrow your problem down to a more trivial case by changing the do shell script part to look like this:
set UNIXpath to store_target & thisItem set myScript to "touch -acfm " & UNIXpath -- Testing! --do shell script myScript log myScript
Now run the script in Log mode from the Script Editor. Grab one of the logged "myScript" values and try to copy/paste that into a terminal window. Does it work?
Is it possible that this list of paths has spaces, etc., in it? You might need to do something like this:
set myScript to "touch -acfm " & quoted form of UNIXpath
I find that in general, it's very useful for debugging to keep the shell script composition separate from the line that actually executes it.
Daniel
On Oct 23, 2005, at 8:39 AM, John Mitchell wrote: I have over 9000 file date errors in the log after a duplicate using Retrospect.
I thought I could write a script that read the log, found the path of the file and then UNIX touched it.
--parse the log into a list of UNIX file paths set {flag, dsList} to processFile(theFile) --now update DOM to be after DOC, ie today set current_user to (do shell script "id -un") set store_target to ("/Users/" & current_user & "/") repeat with thisItem in dsList try set UNIXpath to store_target & thisItem do shell script "touch -acfm " & UNIXpath on error errMsg number errNum display dialog errMsg & space & (errNum as string) end try end repeat
however although I get no error (" ") the date is not updated. I tried adding "with administrator privileges" but no result.
Any suggestions? --
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
|