MS DOS Files And Directories

When it comes to computers, data is stored in files. When you run a program, MS-DOS processes the data stored in the file and passes it to the system. In MS-DOS a file can be any size, however the file name is more restricted, it can only have a maximum length of 8 characters plus 3 for the extension.

Supported Characters

Furthermore, the files can only contain the following characters:

  • Letters A to Z
  • Numbers 0 to 9
  • The following special characters: $~! # % & - { } ( ) @ ' _ ^

File Naming

Thus filenames must not contain:

  • Spaces
  • Commas
  • Backslash
  • Dot (apart from the dot that separates the name and the extension)

Also, the cannot contain any of the following list of reserved names:

  • CLOCK$
  • CON
  • AUX
  • COM1
  • COM2
  • COM3
  • COM4
  • LPT1
  • LPT2
  • LPT3
  • NUL
  • PRN

Organizing Files in Directories or Folders

A hard drive can contain several thousands of files. However, the more files there are, the more difficult it is to manage them: this is when we need to store them in directories. In MS-DOS, directory names are also subject to the same name restrictions as files.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
Related
This document, titled « MS DOS Files And Directories », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).