• 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
Re: Loop to erase the contents of my logs ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loop to erase the contents of my logs ...


  • Subject: Re: Loop to erase the contents of my logs ...
  • From: Christopher Nebel <email@hidden>
  • Date: Tue, 10 Jun 2003 15:48:01 -0700

On Tuesday, June 10, 2003, at 11:05 AM, Andrew Oliver wrote:

The Finder doesn't follow the POSIX-based, /-delimited pathnames. Instead is
uses the Mac OS-based :-delimited pathnames

So:

tell application "Finder"
set logFiles to name of every file of folder ":private:var:log3" whose
name ends with ".log
delete logFiles
end tell

Ah, no. There's a lot more to POSIX-to-HFS path translation than transliterating slashes to colons. Take a look a what 'POSIX file "/var/log"' returns. Besides, Charles was already doing the right thing by pumping the POSIX path through "POSIX file".


--Chris Nebel
Apple Development Tools
_______________________________________________
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.

  • Follow-Ups:
    • Re: Loop to erase the contents of my logs ...
      • From: Andrew Oliver <email@hidden>
References: 
 >Re: Loop to erase the contents of my logs ... (From: Andrew Oliver <email@hidden>)

  • Prev by Date: Re: Loop to erase the contents of my logs ...
  • Next by Date: Re: osascript and dialogs
  • Previous by thread: Re: Loop to erase the contents of my logs ...
  • Next by thread: Re: Loop to erase the contents of my logs ...
  • Index(es):
    • Date
    • Thread