• 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: Andrew Oliver <email@hidden>
  • Date: Tue, 10 Jun 2003 16:03:26 -0700

Yeah, I spoke too soon. I'm so used to treating POSIX paths and the Finder
like oil and water - making sure they never mix, that I didn't read the
original code closely enough.

My bad.

Andrew
:)


On 6/10/03 3:48 PM, "Christopher Nebel" <email@hidden> wrote:

> 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.
_______________________________________________
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: 
 >Re: Loop to erase the contents of my logs ... (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: osascript and dialogs
  • 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