Windows Commands
Windows Commands
The following is my command prompt reference in case I forget any of it. This can also be used as a how-to guide if you are new to the Windows command line. You can open the your program and start testing out the features. Just make sure you dont accidentally delete anything important. Heres the results: (if you are new to this, then first see cd and dir) Feel free to leave feedback!
To open the Windows command prompt you may do one of the following: - Click Start -> Programs -> Accessories -> Command Prompt - Click Start (or hit the Windows key), type cmd in search, then hit [ENTER] - Windows Key + R (#r, not the pound symbol) brings up Run. Then type cmd then [ENTER] - SHIFT + right-click in any folder or desktop, then select open command window here
exit = exit the command prompt filename.txt = opens filename.txt in current directory in Notepad (or default .txt program) format z: = format z drive [Ex: use to format a disc or flash drive] mkdir x = make directory x in current directory move x y = more or rename x to y q = escapes sequential display of contents (i.e. the more parameter) rd x = remove/delete directory x if its empty ren x y = rename file x to y time = change the time type file = display the contents of the file file (displays file contents in console) type file |more = display the contents one line at a time
color 0a = change prompt color to matrix green and screen color to black color 84 = change colors to red on grey 0 = black 1 = blue 2 = green 3 = cyan 4 = red 5 = magenta 6 = yellow 7 = white 8 = grey 9 = bright blue a = bright green b = bright cyan c = bright red d = bright magenta e = bright yellow f = bright white
Miscellaneous
Acceptable characters: A-Z a-z 0-9 $ # & @ ! ( ) { } ` _ ~ Unacceptable characters: | < > \ ^ + = ? / [ ] ; , * : % ? = wildcard for any single character * = wildcard for any/all characters/files
> = redirects output to (overwrite) a file or device >> = redirects output to (append to) a file or device < = directs data from a file or device to a program or device << = directs additional data from a file or device to a program or device nul = black hole
System-generated upon Windows startup: %DATE% = Tue 08/02/2011 %TIME% = 14:23:33.37 %SYSTEMROOT% = C:\Windows %COMPUTERNAME% = DAN-PC System-generated upon user login: %USERNAME% = Dan %USERDOMAIN% = Dan-PC Local machine variables for all users: %PATH% = C:\Windows\system32 %HOMEPATH% = \Users\Dan %HOMEDRIVE% = C: (Hint: Use echo)
Function Keys
F1 = Sequential, individual repeat of previously entered characters F2 = Copies any number of characters from the previous command line F3 = Repeats the contents of the previous command line F4 = Deletes any number of characters from the previous command line F5 = Return to the previous command line F6 = Enters the characters ^z (CTRL+z), indicating end of file F7 = Displays a history of command-line entries for the current session (50-line cache) F8 = Sequentially displays previous command-line entries F9 = Enables user to recall previous command lines by number (0 = first line)