ADVERTISEMENT
ADVERTISEMENT

Directory structure and naming rules to a file in DOS operating system

Here, we are going to learn about the directory structure and naming rules to a file in DOS operating system.
Submitted by IncludeHelp, on December 10, 2020

Directory Structure

In DOS, the directory structure is often Windows-like. The C drive is a root directory written in the form of a C:\

The directory is nested and is called a sub-directory.

It looks just like a tree, except the roots are at the end!!

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.

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.

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.

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 (.)
ADVERTISEMENT



ADVERTISEMENT



Comments and Discussions


ADVERTISEMENT

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.