Microsoft KB Archive/65816

Searching for a File from DOS PSS ID Number: Q65816 Article last modified on 09-23-1991 PSS database name: PSS

Summary:

Determining the existence of a file on a system can be accomplished by using some basic DOS commands. There are two methods that can be used.

Method 1: (TREE /F | find “FILENAME”)
MS-DOS 3.20 or later IBM 2.0 or later

  Go to the root directory of the drive where the search is to be done.   Search for file, using the following command: TREE /F | find “FILENAME” 

“FILENAME” will be displayed for each occurrence of the file in the file list.

Method 2: (CHKDSK /V | find “FILENAME”)
MS-DOS 3.20 or later IBM 2.0 or later

  Go to the root directory of the drive where the search is to be done.   Search for the file, using the following command: CHKDSK /V | find “FILENAME” 

“PATH” will be displayed for each occurrence of the file in the file list. This method can be useful for finding where a file exists.

Note: The Find command is case sensitive; therefore, the DOS filename must be entered in uppercase characters.

Copyright Microsoft Corporation 1991.