Basic DOS Commands
Lesley Garcia
Intro to DOS Commands
What are DOS Commands?
Why are DOS Commands important?
Some of the Basic DOS Commands
File Attributes
- Hidden (+/-H)
- Read-Only (+/-R)
- Archive (+/-A)
- System (+/-S)
To use these commands through command prompt, the command will be typed as ATTRIB +/-H,A,R,S. When the + is added to the command (ex: ATTRIB +A), it will make the file archive. When the - is added to the command (ex: ATTRIB -H) it will remove the attribute command you chose for the file. With the Hidden Attribute (+/-H), you can hide any file. The System attribute (+/-S) makes a file into a System file. Using the Archive attribute (+/-A), makes the file archive but every file that you recently make is always archive. The Read-Only attribute (+/-R) make a file only readable and not able to be deleted.
Wildcards
- Ex for Asterisk:
C:\Users\MAC-8\CTECH>ren j*.txt ctech1.txt
Using the asterisk, the asterisk will find any file starting with the letter j that's a .txt file extension (New Text Document) and will rename that/those file(s) into ctech.
- Ex for Question mark:
C:\Users\MAC-8\CTECH>copy ctech?.txt ctech2015.jpeg
Using the Question mark in command prompt, The question mark will look for the file on ctech that is a new text document file (.txt) but with an extra character that could represent a number and rename it to ctech2015 but as an image file (.jpeg).
DOS Commands
- CD- Changes the Directories
- DIR- Shows the different directories there are on your computer
- CLS- Clears your cmd screen
- CD..- Goes back 1 directory
- RD- Deletes a folder directory
- MD- Makes a folder
- MKDIR- Makes a directory
- Copy- Copies a document into a folder
- Erase- Deletes files