Ad Space — Top Banner

File not found

Microsoft MS-DOS

Severity: Minor

What Does This Error Mean?

File not found means DOS searched the specified location but the file does not exist there. The filename may be misspelled, you may be in the wrong directory, or the file is on a different drive. Use DIR to see what files are in the current directory.

Affected Models

  • MS-DOS 3.x
  • MS-DOS 4.x
  • MS-DOS 5.x
  • MS-DOS 6.x
  • PC-DOS
  • FreeDOS
  • DOSBox

Common Causes

  • Filename misspelled (DOS requires exact spelling)
  • File is in a different directory than the current one
  • File is on a different drive (A:, C:, D:)
  • File extension wrong or missing — DOS needs the full 8.3 name
  • File was deleted or never existed on this machine

How to Fix It

  1. Type DIR and press Enter to see files in the current directory.

    DIR lists all files and subdirectories. If your file is not listed, you are in the wrong directory.

  2. Use DIR /S to search for the file in all subdirectories.

    DIR MYFILE.TXT /S searches the entire current drive for MYFILE.TXT. This is the DOS equivalent of a file search.

  3. Check the filename spelling and extension.

    DOS filenames follow the 8.3 format. MYPROG.EXE is correct. MY PROGRAM.EXE is invalid (no spaces allowed). Extensions matter: MYFILE.DOC is different from MYFILE.TXT.

  4. Navigate to the correct directory with CD.

    Use CD\ to go to the root, then CD DIRNAME to enter subdirectories. Type DIR at each level to see what is there.

Frequently Asked Questions

What is the difference between File not found and Bad command or file name?

File not found appears when you specify a file (e.g. COPY MYFILE.TXT) and the file does not exist. Bad command or file name appears when you type a command and DOS cannot find the program (.EXE/.COM/.BAT) anywhere.

Can DOS filenames have spaces?

No. DOS filenames cannot contain spaces. Use underscores or no separator: MY_FILE.TXT or MYFILE.TXT. Long filenames with spaces were introduced in Windows 95.