• 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
Do Shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Do Shell script


  • Subject: Do Shell script
  • From: John Mitchell <email@hidden>
  • Date: Sun, 23 Oct 2005 22:39:20 +1000

Title: Do Shell script
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?
--
John
email: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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Do Shell script
      • From: Christopher Nebel <email@hidden>
    • Re: Do Shell script
      • From: Daniel Jalkut <email@hidden>
  • Prev by Date: Re: Address Book label properties
  • Next by Date: Re: Do Shell script
  • Previous by thread: Re: Case sensitivity of text item delimiters
  • Next by thread: Re: Do Shell script
  • Index(es):
    • Date
    • Thread