|
Computer Management: compmgmt.msc |
Performance Monitior Console: perfmon ** |
|
Display Connection Configuration: ipconfig /all Display DNS Cache Info Configuration: ipconfig /displaydns Clear DNS Cache: ipconfig /flushdns Release All IP Address Connections: ipconfig /release Renew All IP Address Connections: ipconfig /renew Re-Register the DNS connections: ipconfig /registerdns Change/Modify DHCP Class ID: ipconfig /setclassid Network Connections: control netconnections List or Map Network Drives: net use |
Network Setup Wizard: netsetup.cpl |
|
List Running Processes: wmic process get description,executablepath Print a List of Running Processes: wmic /output:c:\process.txt process get description,executablepath Create a simple list of files in a directory, output to a text file: dir /b/s >dirtext.txt Create a list of files in a directory, including sub-directories, sorted by directory, to a text file: dir /s /b /o:gn > Listing.txt More Information >> - Command line syntax to stop services Copy and Paste in an MS-DOS window (Two Options):
Here you can directly highlight the text in the Command Prompt by left clicking the mouse and then dragging it over the desired text.
Problems... If you're unable to highlight text in the window, right-click on the title bar and click Properties; in the Properties window, click the Options tab, and check the "QuickEdit Mode" and click the Ok button. Windows will prompt you how you wish to apply the new changes. If you wish to always have this option available (recommended), select "Save properties for future windows with same title" and click Ok. How to copy an entire directory tree WITHOUT the files Use XCopy as follows: XCOPY C:\SOURCE E:\TARGET /T /E, C:\SAMPLE> including subfolders as follows: At the DOS Command Prompt type the following command (as an example): |
| Use the Net Use command to map or disconnect a drive You can use the net use command for batch files and scripts. To use the net use command to map or disconnect a drive: To map a network drive:
|
| Operator | Usage and Result (More Redirects) |
|---|---|
& |
Command A & Command B - execute command A, then execute command B. (no
evaluation) example: dir c:\ & echo All done! |
| |
Command A | command B - execute command A, and redirect all Command A's output
into the input of command B. example: help | more |
&& |
Command A && Command B - means execute command A, Evaluate the errorlevel
after running Command A, and if the exit code (errorlevel) is 0, only
then execute command B. |
|| |
Command A || command B - execute Command A, evaluate the exit code of
this command and if it's anything but 0, Only then execute command B. example: dir c:\windows || echo I can't find this directory c:\windows |
>> |
command A >> outputfile.txt - means execute command A, and write (append) the Output to outputfile.txt example: dir c:\>> outputfile.txt, will add the "dir" output to the existing file or create a new one if not existing. |
@ |
Commands beginning with the @ command are never echoed before running. The main use is to prevent batch echo by placing a command @echo off at the beginning of batch files. |
: |
A colon in front of a word, like :label , designates a label. Unlike remarks (REM), labels are not processed by the command processor, so comments might be added proceeded by a pair of colons. example: ::, or by a colon and space. |
; |
Semicolons at the beginning of the line are usually processed by the command processor, but most other programs ignore these. This might be used to add a small batch file to the beginning of a program's data file, in the way that EXTPROC works. |
/* |
In PC DOS, OS/2 thus 4OS2, 4DOS, 4NT etc, a batch file beginning with /* is treated as a REXX script. PC DOS 7.0, 2000 and 7.1 implement this feature.
In REXX, as in C, comments are surrounded by a matching /* comment */.
example: /* comment */ |
() |
Commands surrounded by parentheses, "(" and ")", are treated as a single command. This is very useful to execute several commands in the same iteration of a FOR loop. |
|
DOS Command List - Link to command list website |
|
Sets the default console foreground and background colors. "COLOR [attr]" [attr] - Specifies color attribute of console output
Color attributes are specified by TWO hex digits -- the first
corresponds to the background; the second the foreground. Each digit
can be any of the following values:
0 = Black 8 = Gray
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple
6 = Yellow E = Light Yellow
7 = White F = Bright White
If no argument is given, this command restores the color to what it was
when CMD.EXE started. This value either comes from the current console
window, the /T command line switch or from the DefaultColor registry
value.
The COLOR command sets ERRORLEVEL to 1 if an attempt is made to execute
the COLOR command with a foreground and background color that are the
same.
Example: "COLOR fc" produces light red on bright white
|
|
Check a file’s hash on Windows Open the Windows command prompt and use the certutil command for Windows.
The "MD5" version gives the hash in the form: 911a6223779dd825bc0c7cda1ce69a3 |