Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: AppleScript and StataSE


From   David Airey <[email protected]>
To   [email protected]
Subject   Re: st: AppleScript and StataSE
Date   Wed, 26 Mar 2003 20:12:59 -0600

This is an Apple technical document excerpt, which explains some of my confusion about Applescript and StataSE and the use of :'s or /'s in pathnames. From what this says, I should be able to get Applescript to work with pathnames containing /'s and not :'s. Chinh Nguyen has stated that :'s still work.

What is a pathname?

To find a file or folder, you follow a particular path. As in Figure 2, you might open the Mac OS X disk, then the Users folder, then the folder with your user name (or Home directory), and finally your Desktop folder. A pathname is simply a concise way to identify a folder by both its name and its location in the file system. This is important when files and folders have the same name and can only be differentiated by location. Mac OS X, for example, has four or more folders named "Fonts" that can only be identified by pathname.

Absolute pathname

An absolute pathname gives an exact location by including the name of every folder in the path from the root of the disk to the item being named. For example, the absolute pathname of the Desktop folder in Figure 2 would be:

/Users/mdh/Desktop

Note that the root of the disk is represented simply by the first solidus, or "slash," symbol. Each subsequent solidus marks a division between the names of nested folders.

Relative pathname

A relative pathname is described from the current location. If you were the user mdh and you selected the Users folder (Figure 2), then the relative pathname for the Desktop folder would be:

mdh/Desktop

Special abbreviations: the Home directory (~/) and root directory (/)

It is conventional to use the tilde (~) character to represent the Home directory. For example, you could note that each user can install personal fonts at ~/Library/Fonts/ in Mac OS X. The tilde may refer to Home directories stored on your computer or on a network server.

It conventional to represent the root directory with the first solidus (/) character in an absolute pathname.

Punctuation of pathnames: solidus (/) versus colon (:)

For Mac OS X and other UNIX or UNIX-like operating systems, it is conventional to use the solidus (/) character to mark the division of names. In earlier versions of Mac OS, it is conventional to use a colon. A Mac OS 9 pathname would look like:

System Folder: Preferences: Sherlock Prefs: Sherlock Defaults

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index