TagMaster 2.0 Manual  (Table of Contents)
  Chapter 2 , Section 2    
2.4 Absolute vs. relative filenames (Previous)
 

 

Relative filenames are a feature of TagMaster which allow you to define a path independent of the path in which it is located. That is, a file path name is defined relative to the default directory from which it is referenced.

There are very few situations in which you would not want to use relative filenames. TagMaster defaults with the option on. If you do require that filenames are referenced by absolute filenames, keep in mind that you cannot change directory names or the disk on which the project is kept without disturbing the file links within the build files.

TagMaster relative filenames use standard DOS conventions, but allow for Windows long filenames. For example, suppose you had the following group of files collected in directories as follows:

C:\New Project\ref1.htm
C:\New Project\data\ref2.htm
C:\New Project\working\main.bld
C:\New Project\working\ref3.htm


All file references occur inside build files. The only Build file in the file list above is "main.bld" on the third line. From "main.bld" files "ref1.htm", "ref2.htm", and "ref3.htm" may be referred to by absolute or relative filenames. The list above consists of the absolute filenames for each of the files. It begins with the device name, follows with a path, and ends with a file.

Relative filenames work somewhat differently. The relative filename reference to "C:\New Project\ref1.htm" from "C:\New Project\working\main.bld" would be: "..\ref1.htm"; the reference to "ref2.htm" above would be: "..\data\ref2.htm"; and the reference to "ref3.htm" would be just "ref3.htm". In this fashion, files related to the same project could sustain links whether or not the pathnames change or the project moves to another disk.

To decipher a relative filename, simply insert the path of the file in which the relative filename is contained (the default directory) before the relative filename, and work from there. Remember that in DOS ".." becomes the directory in which the current directory is contained.

Referring filename (RF): C:\New Project\working\main.bld
Default directory (DD): C:\New Project\working\

Relative: ..\ref1.htm
DD + RF : C:\New Project\working\..\ref1.htm
Absolute: C:\New Project\ref1.htm

Relative: ..\data\ref2.htm
DD + RF : C:\New Project\working\..\data\ref2.htm
Absolute: C:\New Project\data\ref2.htm

Relative: ..\ref3.htm
DD + RF : C:\New Project\working\..\ref3.htm
Absolute: C:\New Project\working\ref3.htm

Relative: part2\ref4.htm
DD + RF : C:\New Project\working\part2\ref4.htm
Absolute: C:\New Project\working\part2\ref4.htm


When checked, the "Use relative filenames" preference (located in the "General" pane of the preferences) directs TagMaster to use relative filenames at all times unless the Build file is unsaved, and therefore has no default directory. If unchecked, the preference directs TagMaster to always use absolute filenames.

 

© Copyright 1997-1999 Dataczar Technologies. All rights reserved.