Re: Loop to erase the contents of my logs ...
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.