Windows NT and Windows 95 Directories

The native Windows NT and Windows 95 operating systems use a hierarchical directory structure based on the drive letter. The AFTP API builds on this structure by making the drive the first segment of the directory path. For an AFTP application based on Windows NT or Windows 95, the AFTP root directory represents all of the drives available on the computer. In the native Windows NT or Windows 95 operating system, a current directory setting is maintained for each drive. This difference of interpretation can have some surprising consequences.

For example, the following series of commands issued on Windows NT or Windows 95 will delete the files in the C:\WORK\AFTP directory:

[C:\]  cd \work\aftp
[C:\WORK\AFTP\]  cd e:\new\data\
[C:\WORK\AFTP\]  erase C:*.*
 

AFTP, however, uses a virtual root that encompasses all of the drives, and the Windows NT or Windows 95 drive letter is treated as the first segment of a path. Only one current directory setting is maintained by the AFTP API. If a path is not specified to an AFTP API function, the root directory of that drive is used.

The equivalent set of functions issued using the AFTP API will erase all of the files on drive C, not only the files in the C:\WORK\AFTP directory:

aftp> cd c:\work\aftp
aftp> cd e:\new\data
aftp> delete c:*.*
 

If it becomes necessary to manipulate files on a drive other than the drive set as the current directory, always use fully qualified file names to ensure that the correct directory and files are used.