Zeus Tech Note
Path and File Specifications
(This document last revised August 14, 1997)
Copyright © 1996-1997. Zeus
Productions. All Rights Reserved.
Written by Bruce A. Epstein
How can I specify a Macintosh PathName?
- Specifying Macintosh pathNames is easy once you understand the rules.
Macintosh pathNames start with the hard drive, followed by any folders,
and finally the document, with each item in the path separated by a colon.
The general form is:
hardDriveName:folderName1:folderName2:fileName
Are Macintosh and Windows file and path names
case-sensitive?
- Macintosh and DOS/Windows file names are not case-sensitive.
The following are all equivalent.
myFile
myfile
MYFILE
MyFiLe
Be careful:
- File names are "whitespace-sensitive", so be careful about
extraneous spaces either at the beginning or end of a file name.
- The hidden Macintosh File Types and Creator
Codes are case-sensitive.
How do Mac and PC file names differ?
- Those of you familiar with the DOS/Windows pathName standards, will
notice the following differences:
- There is no "drive letters" on the Macintosh as there are
under Windows. Instead, each drive, whether it is a floppy, hard drive or
CD, has a name. This is convenient because the name of your CD, for example,
is the same regardless of how many devices are connected to the user's system.
It is possible to have two drives with the same name, but name conflicts
are rare.You should name your CD something that is reliably unique.
- A Macintosh drive name is separated from the rest of the path specification
by a colon (:). Under DOS/Windows, the drive letter is separated from the
rest of the path specification by a colon-backslash combination (:\).
- Macintosh folder and file names in the path specification are also
separated by a colon (:). Under DOS/Windows, folder and file names are separated
by a backslash (\).
- Each Macintosh file or folder name can contain up to 31 characters.
Under DOS and Windows 3.1, file names are limited to eight characters, followed
by a period (.) followed by a maximum of a 3-character extension. Windows
95 supports longer file names.
- Macintosh file and folder names can contain spaces, backslashes, commas,
and any other character other than a colon (:). Under DOS and Windows 3.1,
filenames can not contain spaces, backslashes nor many other non-alphanumeric
characters. Generally file names should be limited to alphanumerics. Windows
95 imposes less-stringent requirements. For example, Windows 95 supports
file names with spaces.
Special Note for Files and Folders on the
Desktop:
- Files on the Macintosh desktop are referenced using the special reserved
term "
Desktop Folder
" after the drive name and before
the remainder of the path.
- For example, a file called "
myDocument
" on
the desktop would be referred to as:
MyHD:DeskTop Folder:myDocument
- A document within a folder on the desktop is referenced in a similar
manner:
MyHD:DeskTop Folder:MyFolder:myDocument
Notes about the Desktop Folder:
- Each Macintosh drive has its own "
DeskTop
Folder
".
- There is a space between the words "
DeskTop
"
and "Folder
".
- If you fail to specify the "
DeskTop Folder
"
portion of the path, zLaunch will look for an item inside the first (root)
level of the drive, not on the desktop, as in:
MyHD:myDocument
- If you attempt to create a file or folder called "
desktop
folder
" on the Macintosh desktop, you will get the error message:
The name "desktop folder" is reserved by the system software.
Please use a different name.
Try it and see!
Why can't my file be found?
- If your document can not be located when you are specifying a path,
likely sources of error include:
- Missing or incorrect drive letter (PC) or drive name (Mac)
- Omitting one or more folder names within the path
- Incorrect path separators. Use ":\" after the drive letter,
and backslashes (\) to separate items in the path on the PC and colons ":"
on the Mac
- Misspelled file or folder names
- Mistyped files or folder names
- Extraneous spaces at the beginning, middle or end of a file path (or
missing required spaces in Macintosh or Windows 95 long file name)
- Hidden control characters
or missing special characters in the file paths
- Referring to a Windows shortcut
or Mac alias when it is not supported
by a particular application.
- Using Windows 95 long file names when they are not support by a particular
application. Try to stick with DOS-style (eight-dot-three)
file names and folder names.
- Accessing hidden files when they are not support by a particular application.
- Opening a document in a format not supported by an application.
Trouble-Shooting Macintosh File Paths
- The Lingo
open
command
may not work with aliases. Specify the path to the original file rather
than to an alias.
- Be sure that you have correctly entered the path and file name. Make
sure that there are not any extraneous spaces anywhere in the file name,
especially at the end.
- Beware of hidden files, such as icon files, or files that have purposely
had their "hidden attribute" set. Some software does not work
with hidden files.
Trouble-Shooting Windows File Paths
- The Lingo
open
command
may not work with Windows shortcuts. Specify the path to the original file
rather than using a shortcut.
- Be sure that the names obey the eight-dot-three conventions. Not all
application support long Windows-95 style names, especially ones containing
spaces.
- The ISO 9660 Standard, common when burning CDs, does not support hyphens.
Any DOS files names contaiing hyphens will be converted to underscores unless
you specify "Allow DOS filename" in your CD-ROM Burning software
setup.
- Beware of hidden files, such as icon files, or files that have purposely
had their "hidden attribute" set. Some software does not work
with hidden files.
- Beware hard-coded path names. The drive letter on a CD-ROM will vary
on different computers. Use relative paths, or query for the user's drive
letter instead.
What is a working directory and how do I
set one?
- Many applications assume that the documents and other files that they
may require are located in the "working directory". zLaunch
allows you to set the working directory for externally launched applications
ensuring that all of their components can be found. zLaunch then resets
the working directory upon return to Director.
- Under Windows 3.1, this would be the same working directory as specified
in the properties of the Program Icon associated with the application, if
any. To view the properties of a Program Icon , hilight the Program Icon
in the Program Manager, and select "Properties" or hit Alt-Enter.
- Similarly, under Windows 95, this would be the same working directory
as specified in the properties of the shortcut associated with the application,
if any. To view the properties of a shortcut, hilight the shortcut, and
click on the right mouse button. Then select Properties, and click on the
Shortcut tab in the Properties dialog box. The working directory is defined
by the "Start in:" field.
Home (Spotlight) | Table
of Contents | Links | Contact
Info
Place an Order | Products
for Sale | Licensing | Downloads
TechNotes | FAQs
| E-Mail Zeus | GuestBook
| Glossary
Copyright © 1996-1997. Zeus
Productions. All Rights Reserved.