DOS+a+little+explanation+of

DOS a little explanation of

DOS uses what is called an 8.3 file naming structure, otherwise known as eight dot three. Put simply this means that a file name can be up to eight characters long and have a three character extension representing the file type. A period/full stop 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.



If for example we take the DOS file name AUTOEXEC.BAT. The AUTOEXEC segment is the DOS file name. The .BAT extension specifies that the file is a batch file.

The same applies for the CONFIG.SYS file. CONFIG is the name of the file. The .SYS extension identifies the file as a system file.

So you can see that the following rules apply to DOS files 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. Characters such as :- (? *, ; = + #### >| [ ] / \) 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 example below:-

LFN = BEST CERTIFICATIONBOOK.DOC 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 very 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.

It is 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, you would need to enter the following command at a DOS prompt ( > Chevron ) C:\ATTRIB -R -H MSDOS.SYS

This command then removes the Read-Only and Hidden Attributes associated with the file.

By implementing this command you would then be able to read and delete the file. Note: In no circumstances delete MSDOS.SYS.

It is possible to replace the removed attributes to MSDOS.SYS by issuing the following command at the DOS prompt: C:\ATTRIB +R +H MSDOS.SYS (However, do not remove them in the first place)

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

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

Right click the Start button. Left click Explore. Left click View (Located on the top menu bar). Left click Folder Options Left click View. Under the Files and Folders/Hidden Files section Left click “Show all files.” Left click Apply Then left click OK. Close the Folder Options window.

The MSDOS.SYS file, along with other system files, will now be visible on the right side of screen.

Locate 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/tick marks or you can add desired attributes by adding check marks.

Always bear in mind that folders, as well as files, also have attributes

NOTE:- Many important operating system files are hidden with a typical default operating system installation for the protection of the average user.

It is good housekeeping to “Show all files” or “Show hidden files and folders” under Folder Options. 