• 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: 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.

  • Follow-Ups:
    • Re: Referencing a folder with "~" in the name
      • From: John W Baxter <email@hidden>
References: 
 >Re: Referencing a folder with "~" in the name (From: Gnarlodious <email@hidden>)

  • Prev by Date: Re: AppleScript Language Guide
  • Next by Date: Re: "mylist" vs "a reference to" - speed difference
  • Previous by thread: Re: Referencing a folder with "~" in the name
  • Next by thread: Re: Referencing a folder with "~" in the name
  • Index(es):
    • Date
    • Thread