Tech Tips Home
The Best Tech Tips And Daily Deals
Newsletter On The Internet!

WorldStart Tech Tip And Store Search
Email: Password: Login Remember Me

Like what you see here? Subscribe to the Tech Tips newsletter!   Email: Subscribe

DOS File Name Structure

Friday, September 1st, 2006 by | Filed Under: Computer Terms

You may know that DOS files are stored in directories or subdirectories. Well, in today’s Windows world, directories are called folders and when talking about DOS, specific rules apply to creating and naming those files and directories.

DOS uses what is called an 8.3 file naming structure, otherwise known as eight dot three. This simply means that a file name can be up to eight characters long and have a three character extension representing the file type. A period is used to separate the file name from the extension. The total length of the DOS file name, plus the extension, cannot exceed 11 characters. The file extension is not necessary unless the file is associated with a particular function. The following table displays a list of common DOS Windows file extensions with their associations.

Now, let us use the DOS file name AUTOEXEC.BAT as an example. The AUTOEXEC segment is the DOS file name. The .BAT extension specifies that the file is a batch file. The same is true for the CONFIG.SYS file. CONFIG is the name of the file and the .SYS extension identifies the file as a system file.

Following are rules that apply to DOS file and directory name creation:

  • A file or directory name can be no more than eight characters long.
  • An extension can be no more than three characters long.
  • No spaces can be included in the file name, the extension or the directory name.
  • Certain characters (? * , ; = + #### >| [ ] / \) are illegal and cannot be used.

Long File Names (LFNS)

Windows 9x, NT, 2000, ME and Windows XP support long file names (LFNs). LFNs can be up to 255 characters in length. Although these newer operating systems support LFNs, they still allow for backward compatibility with the 8.3 naming structure associated with DOS by creating an associated 8.3 file name for every new file created. LFNs are broken into 12-byte sections that allow the use of up to 255 characters, as in the following:


8.3 associated file name = BESTCE~1.DOC

Notice that the space after BEST is eliminated in the 8.3 associated file name. Windows automatically removes any spaces or invalid characters and truncates the file name.

It is important to note that the Windows 9x root directory (C:\) can hold only 255 files. The truncation of LFNs to 8.3 names can quickly fill up this 255 file storage limitation and cause your system to halt. For this reason and others, it is good practice to avoid storing files in the root directory of any operating system.

File Attributes

System files in DOS and Windows, such as IO.SYS and MSDOS.SYS, are hidden, read-only system files. This means that they cannot be viewed or deleted unless their file attributes are modified. Four major attributes can be assigned to DOS and Windows files: R (read-only), A (archive), H (hidden) and S (system).

In DOS, the ATTRIB command can be used to modify the attributes of a file at the command line. For example, to change the attributes for the system file MSDOS.SYS from a read-only/hidden file, enter the following command at a DOS prompt:


This command removes the read-only and hidden attributes associated with the file. You will then be able to read and delete the file. Please don’t delete MSDOS.SYS until you are certified. You can add the attributes back to MSDOS.SYS by issuing the following command at the DOS prompt:


In Windows 9x, Me, NT, 2000 and Windows XP, the attributes of a file can be viewed and changed (if the currently logged on user has permissions to do so) by simply right clicking a file in Windows Explorer and either checking or unchecking the appropriate file attribute.

To locate the file MSDOS.SYS in Windows 9x:

1) Right click the Start button.
2) Left click Explore.
3) Then left click View (located on the top menu bar).
4) Left click Folder Options, then left click View.
5) Under the Files and Folders/Hidden Files section, left click “Show all files.”
6) Then left click Apply and left click OK.
7) Close the Folder Options window.

The MSDOS.SYS file, along with other system files, will now be visible on the right side of screen. Find the MSDOS.SYS file and right click it. Left click Properties. You should now see a window similar to the one shown below. You can remove the selected file attributes by removing the check marks, or you can add desired attributes by adding check marks. Keep in mind that folders, as well as, files also have attributes.

The above screenshot is the Windows 9x display of file attributes.

NOTE: Many important operating system files are hidden with a typical default operating system installation for the protection of the average user. You should always remember to “Show all files” or “Show hidden files and folders” under Folder Options before troubleshooting.

Hope the above information helps in understanding the DOS File Name Structure a little better.

~ Nagarajan

One Response to “DOS File Name Structure”

  1. XRumerTest says:

    Hello. And Bye.

Leave a Reply

Like these tips? Get them for FREE in your email!

WorldStart's Tech Tips Newsletter

  • Tech Tips Daily - Become a tech pro! Get the very best tech and computer help sent directly to your email every weekday!

  • Tech Tips Weekly - If you don't want our Tech Tips newsletter every day, then sign up for this weekly newsletter to get the best information of the week. Sent on Fridays.

Other Newsletters

  • WorldStart's Daily Deals - Every week, we send out great deals in our Daily Deals newsletter. Many of these deals are exclusively for our Daily Deals newsletter subscribers and can't be found with our regular specials.

  • Just For Grins - Each issue includes a couple clean jokes, some funny quotes, and a hilarious reader's story. Newsletter is sent five days a week.

Enter Email Address:


Your e-mail address is safe with us!
We only use it to send you the newsletters you request. It is NEVER disclosed to a third party for any reason, ever! Plus, if you decided you don't like our newsletters (don't worry, you'll love them), unsubscribing is fast and easy.

Free Newsletter Signup

Tech Tips Daily

Become a tech pro! Get the very best tech and computer help sent directly to your email every weekday!

Tech Tips Weekly

The week's best in tech and computer help. Get your issue sent to your email every Friday!

WorldStart's Daily Deals

The very best deals on the Internet! Get a new set of incredible sales every day of the week!

Just For Grins

Clean jokes, funny quotes, and hilarious comics. Sent 5 times a week straight to your email.


Love Worldstart? Refer A Friend!

WorldStart's Premium Membership

Tip Archive