Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Add regular expression junk filtering to Mail.app' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Add regular expression junk filtering to Mail.app
Authored by: ngb on Nov 24, '03 03:48:57PM
/tmp is actually in /private/tmp, or in Mac terms "Macintosh HD:private:tmp:".

The AppleScript way to find this is to cast "/tmp" as a posix path. In this case, I'm assigning it to the variable "tmpPath":

set tmpPath to (POSIX file "/tmp")

I believe POSIX file filename can be used anywhere the file filename or alias filename constructs can be used, and conversion will happen on the fly.

[ Reply to This | # ]

Add regular expression junk filtering to Mail.app
Authored by: fortepianissimo on Nov 24, '03 05:20:19PM

I believe the problem is the "on the fly" part - if I do the posix file thing, the conversion to the Mac-formatted path is done on the spot, and the result could be wrong on someone else' Mac (e.g., they might name their HD differently).



[ Reply to This | # ]
Add regular expression junk filtering to Mail.app
Authored by: ngb on Nov 24, '03 08:46:32PM
If you're looking for /tmp on someone's Mac, but you don't know the name of the hard drive, then putting POSIX file "/tmp" in your script should send you to the right directory, even if interpreted on the fly. Alternately, you can get the name of the startup disk by using path to system folder and then strip filter for the text between the first and second ":".

[ Reply to This | # ]