DOS Directory Structure and File Naming Rules

In this tutorial, we will learn about the directory structure and file naming rules in DOS operating system. By IncludeHelp Last updated : May 08, 2023

Structures of Directory in Operating System (DOS)

  1. In DOS, the directory structure is often Windows-like. The C drive is a root directory written in the form of a C:\
  2. The directory is nested and is called a sub-directory.
  3. It looks just like a tree, except the roots are at the end!!
  4. The directory that hosts subdirectories is called the Parent directory. When listing directory content using DIR, (..) it refers to the parent directory, so if we are at C:\WINDOWS\Desktop> (.) it refers to Desktop and (..) refers to WINDOWS. A straight YES is the answer if you are wondering if the dots are helpful. The dots are used to navigate or explore the directories.
  5. If you want to switch to a WINDOWS directory and add a DIR command, you can only type CDs using the Change Directory (CD command). For WINDOWS, go to the directory.
  6. For the full list of commands and uses, go to the Use of Commands section. The CD command is very helpful when we want to navigate through DOS. Type Desktop CD to go back to Desktop.
  7. If we follow the tree structure with the directory C root at the top, type cd.. Once on the Desktop, you'll go up one level. If you're really typing cd.. In the end, the top of the tree, the directory base, can be entered. If you have mentioned cd.. After reaching the root directory, you will get:
    C:\>cd.. Uh, C:
    Invalid Directory

File Names on MS-DOS - important rules for naming the file in DOS

File names on MS-DOS are case-insensitive and are limited to eight characters, plus a time and three additional characters as an option.

The rules for naming a DOS file are:

  • The name of each file in the DOS operating system inside the directory where it is stored should be special. This makes it easy to access this file in advance with a special path name in the file system.
  • The file name should have a maximum length of 255 characters. The name of the file will include numbers, letters and underscores.
  • The Operating System is a sensitive case that displays a different meaning in the file names of upper and lower case letters. Example RULES, rULes, rules These three file names, while present in the same directory, are different file names.
  • Avoid using those characters when naming files:
    • Characters that should be avoided are / \ '*; -? [] ()! ~ $ { } &lt > # @ | &
    • The space tab indicates a new copy of the line in MS-DOSS
  • If the file name begins with a dot, the file name is secret (.)

Comments and Discussions!

Load comments ↻

Copyright © 2024 All rights reserved.