Fourth World Logo Fourth World Media Corporation
  Embassy Services Products Resources   About Fourth World Contact  

IncWell Logo

SuperCard FAQ

4W Logo

What is a pathname?

A pathname is a text string which describes a file and all of the folders it is contained within.

For example, in the path:


The file "MyFile" is contained in a folder named "Folder2", which is in turn contained in a folder named "Folder1", which resides on a volume named "HD". All elements of a path name are always separated by a ":" (colon) character, and the first item is always a volume, whether it be a hard drive, diskette, CD-ROM of other media.

Path names can also be used to describe a folder. In the previous example, if we wanted to the path name of the folder named "Folder2" we would have:


Notice that the last character is a colon. All folder names end in a colon, which is easy to remember since folder usually contain things within them.

These are examples of a full path name, one which describes every element in the chain from the disk to the file in question. But as you can guess, this can get tedious, so SuperCard, with a little help from the Mac OS, also allows you to use a shorter form known as a "partial path".

Partial path names work because the Macintosh remembers the folder that was last used, and considers this the "current" folder. This "current" folder can also be set, and SuperCard sets the current folder to be the one containing the SuperCard application when the program first launches.

The same behavior applies to standalones as well, where a standalone will tell the Mac that its current folder is the one containing it.

So if you knew that a file was in the same folder a SuperCard, you could specify it simply by using its short name. All of the path elements leading up to it are assumed to be those of the current folder, so in describing the file by typing:


SuperCard understands this to mean:


as long as SuperCard is in Folder2.

Here's where things get tricky: We know that a colon following a path element indicates that there is "something more" there, that it is a folder which may have "descendent" files or folders within it. Similarly, we can precede a path element with a colon to specify the folder's parent.

Going back to our example, support you have a standalone named SuperApp inside our Folder2, and also in Folder2 is another folder named "SuperApp Media Folder" containing all of our QuickTime and other media. The paths look like this:

"HD:Folder1:Folder2:SuperApp" -- Standalone "HD:Folder1:Folder2:SuperApp Media Folder:"

We know that a short path name will cause SuperCard to assume that the path to the current folder is a part of the full path, and the same applies to going deeper into other folders. To specify a movie in the Media Folder named "MyMovie", for example, we could type:

":SuperApp Media Folder:MyMovie"

and SuperCard will understand this to mean:

"HD:Folder1:Folder2:SuperApp Media Folder:MyMovie"