Re: Referencing a folder with "~" in the name
Re: Referencing a folder with "~" in the name
- Subject: Re: Referencing a folder with "~" in the name
- From: Christopher Nebel <email@hidden>
- Date: Fri, 26 Apr 2002 08:57:17 -0700
On Friday, April 26, 2002, at 08:37 AM, Gnarlodious wrote:
Entity Simon Forster spoke thus:
...I have an OS 9 box which has a bunch of folders for web users with
names which begin with tilde (~). I have pretty much finished an OS X
script which, once done, needs to file stuff in one of the OS 9
machine's folders. This folder begins with a tilde.
Problem: I cannot reference any folder which starts with a tilde. As
soon as one of the folder names in a path contains "~", the OS X script
complains. (I understand that "~/" has special meaning in Unix land).
Try using a backslash before the literal character
Like this:
"remoteMountedDisk:folderName:folderName:\~restOfFolderName"
Dang, I've already deleted the original message, and I don't remember
all the details...
File paths in AppleScript use Carbon to get their work done, which means
they don't (or at least shouldn't) care about "~" -- that's purely a
POSIX-ism. (In fact, I think it's actually a shell-ism, which means "~"
has no special behavior with "POSIX file", either.) Trying to escape it
will just lead to more trouble.
A few minor experiments here gave me no trouble, though of course I'm
using 1.8.2, which fixed a bunch of path-related bugs. Exactly what was
the original problem?
--Chris Nebel
AppleScript Engineering
_______________________________________________
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.