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: John W Baxter <email@hidden>
- Date: Wed, 24 Apr 2002 18:45:52 -0700
At 14:08 +0100 4/23/2002, Mr Tea wrote:
>
OS X is perfectly happy with items that contain tilde characters in their
>
names (unlike forward slashes), and there's no reason why it should cause
>
problems for AppleScript when it's safely tucked away in a string.
But a *leading* tilda in a name will call for special measures if that name
is used at the start of a path.
At the start of a path, ~x means "the home directory for the user whose
[short] name is x". To make a relative reference to an item named ~x in
the current directory, refer to \~x Or, ./~x whichever pleases you more.
[In an AppleScript string, the latter will avoid having to double the \, so
it may be better...on the other hand it looks like chicken scratches
whereas \\~x looks like leaning toothpicks.]
--John
--
John Baxter email@hidden Port Ludlow, WA, USA
Hey, Scrat!...careful where you bury that thing!
_______________________________________________
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.