MS DOS Files and directories

May 2018

Files in MS DOS

In a 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.

Furthermore, the files can only contain the following characters:

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

Thus filenames must not contain:

  • spaces
  • commas
  • backslash
  • dot (apart from the dot that separates the name and the extension)

nor can they contain any of the following list of reserved names:

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

Organising files in directories or folders

Depending on its size a hard drive may 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 (8 characters for the name, and an extension with 3 characters).

Microsoft DOS: Archivos y directorios
Microsoft DOS: Archivos y directorios
Fichiers et répertoires
Fichiers et répertoires
File e cartelle
File e cartelle
Arquivos e diretórios
Arquivos e diretórios
Latest update on October 16, 2008 at 09:43 AM by Jeff.
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 (