When writing programs that must deal with remote CometAnywhere sessions, it is sometimes necessary to reference files that exist on the remote machine. Typically, you might have files that contain bitmaps or client data that are passed via CATRANS or some other custom program. It is not always possible to know exactly how a remote machine is set up or what directories are to be used for storing/retrieving these files.
Directory aliases provide a mechanism that allows the user of the remote machine to control where files are located on his machine. Comet provides this feature by having COSW (the CometAnywhere client program) examine each filename for a special prefix that indicated the presence of a directory alias. Once the name of the alias has been determined, it is looked up in a table located in the COSW.INI file on the remote machine where a substitute path is retrieved.
The form of an alias in a filename is as follows:
Aliases are only valid at the very beginning of a file name and are NOT case sensitive.
Aliases are maintained from the Directory Aliases dialog off of the COSW “Edit” menu. Here, aliases can be added, removed and modified to suit the system requirements.
The form of an alias entry in COSW.INI is:
Given the above examples, COSW will look up the alias “CATOOLS” in COSW.INI. The contents of the alias entry “C:\COMET\MYTOOLS” is then substituted into the filename to yield the correct path for the target machine “C:\COMET\MYTOOLS\DLGDEMO.DLL”.
The following functions support directory aliases:
Although this document describes the use of aliases at a CometAnywhere remote site, Directory Aliases can also be used on CometAnywhere host installations to aid in the specification of non-Comet files for file transfer operations (CATRANS, VerifyFile, etc).