As I prepare for CompTIA's A+ Certification I will post my revision notes here.

Friday, January 27, 2006

Files, Directories Switches and Filters in DOS

To view the contents of a disc or drive in DOS you need to use the DIR command at the command prompt.
To see the contents of C: make sure you have navigated to the C> prompt, using the CD command. Then type DIR and return. You should see the contents of the C drive. If the contents go over more than one page the use the DIR /P command to page the results.
To view the contents of subdirectories of C use the following syntax for the Dos directory:

C> DIR \DOS /P

To sort all the files alphabetically you can use the SORT filter.

C> DIR \DOS |SORT

Wildcards are useful for only selecting files containing certain characters or of certain file extensions. The example below selects only .COM files:

C> DIR \DOS\*.COM

The * wildcard represents any number of characters while the ? Wildcard represents only one character.
Since MS-DOS version 7 you can use more than one * wildcard in a command.

All pre 7 DOS versions used the 8.3 filename convention. That's versions prior to Windows 95. All filenames had a maximum length of 8 alphanumeric characters and a 3 letter extension. From Windows 95 onwards however filenames could be up to 255 characters, but for backwards compatibility Windows would automatically create an alternate 8.3 format filename reference for each file.

0 Comments:

Post a Comment

<< Home

 
Privacy Policy | Terms and Conditions