• 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: Referencing a folder with "~" in the name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Referencing a folder with "~" in the name (From: Mr Tea <email@hidden>)

  • Prev by Date: Re: Owner/User Name in OSX
  • Next by Date: Re: Removing (or picking) items from list 1 via list 2?
  • Previous by thread: Re: Beep broken in 10.1.4?
  • Next by thread: Re: Referencing a folder with "~" in the name
  • Index(es):
    • Date
    • Thread