- Display the directory
Try , dir/p
dir/w
- Searching for files
Search word documents begin with A – dir a*.doc
Search .doc second letter is A – dir ?a*.doc
Search folder and file – dir *.*
Search only folder – dir *.
- Creating s directory
- Displaying Working Directory
- Changing your working directory
- Copy Files
The copy command is a powerful command that allows you to make a copy of a file with different file name. This command takes two parameters, (remember that parameters are separated by spaces), the original file name and the new file name. For example, type copy myfile.txt myfile2.txt and press enter. What this does is takes the contents of myfile.txt and copies it into another file named myfile2.txt. They are the exact same except for the file names
- Deleting a Directory
To delete a directory in the structure, use the MS-DOS rmdir(remove directory) or rd command. to remove the newfolder directory from the working directory,type rmdir newfolder or rd newfolder.
the newfolder directory must be empty except for the and entries before it can be removed. this prevents you from accidentally deleting files and directory. you can delete any directory by specifying its pathname. to remove the newfolder\test.txt directory, make sure that it has only , then type rmdir newfolder\test.txt or rd newfolder\test.txt
to remove the select files in a directory, erase *.* or del*.*
- Renaming a directory
Renames a file. Unlike the move command, this command cannot be used to rename subdirectories, or rename files across drives. you want to test1.txt rename test2.txt, type
ren test1.txt test2.txt
- commands
- date - display date
- time - display time
- prompt test - display only test
- prompt $d - display only date
- prompt $t - display only time
- prompt $p$g - display working drive
- cls - clear dos command prompt