INF: Drive and Directory Manipulation in Windows

ID Number: Q71760

3.00

WINDOWS

Summary:

To get or set the current drive or directory in an application

developed for the Microsoft Windows environment, use functions

provided by the Microsoft C run-time library. The functions listed

below are compatible with Windows and are documented in the "Microsoft

C Reference" version 6.0 and in the associated QuickHelp on-line help

file. Some of the functions listed below are not available in

Microsoft C version 5.1.

Note: Any time an application gets or sets the current drive, it

should get or set the current directory.

Function Use

-------- ---

chdir Changes current working directory.

_chdrive Changes current drive.

_dos_getdrive Gets the current default drive, using MS-DOS

Interrupt 21h Function 19h.

_dos_setdrive Sets the default disk drive, using MS-DOS

Interrupt 21h Function 0Eh.

getcwd Gets current working directory.

_getdcwd Gets current working directory for the specified drive.

_getdrive Gets the current disk drive.

mkdir Makes a new directory.

rmdir Removes a directory.

_searchenv Searches for a given file on specified paths.

Additional reference words: 3.00 5.10 6.00 retrieve