msconfig autoexec.bat config.sys win.ini
shutdown -i //interactive shutdown - brings up the shutdown menu shutdown -m \computer -r -t 03 //reboot remote cpu after 3 seconds shutdown -r -t 10800 //reboot the cpu after 10,800 sec = 3 hours shutdown -a //abort the timed shutdown
tasklist //lists the tasks running in windows taskkill //kills a running task in windows
You can change the Date and Time stamp of a file to the current setting. COPY filename /B + ,, /Y
By default, when you open a DOS window, the Microsoft Copyright notice shows. To disable it, add the /K switch in the Program tab
For example: C:\WINDOWS\COMMAND.COM /k
Setting the Number of Lines in a DOS Window
To set the number of lines displayed when you open up a DOS window: Create a shortcut for the MS-DOS Prompt Right click on it Select Properties Click on the Program tab In the Batch file:, line enter mode con: lines=xx (where xx is the number of lines you want displayed) Valid numbers for xx are 25 or 43
Submitted by Simon Story email@example.com Expanding Full Path or File Name
NT 4.0 Only
Expand full path/file name with defined char using Command Prompt in Win NT 4.0
You can expand the full name of a file or directory using a character of your choice. Close all Command Prompts Start the Registry Editor Open HKEY_CURRENT_USER\Software\Microsoft\Command Processor If not present, add Key: CompletionChar If you like to use TAB-Key for expand: set value (REG_SZ): "9"
You can test it: Open up a DOS window Type: CD (followed by TAB) The first available directory will appear Press TAB again, the next one will appear The same can be done with the DIR command
Submitted by Uwe Beierlein Adding DOSKEY to your DOS Window
One way to have DOSKEY available when you open a DOS window would be to have it in the AUTOEXEC.BAT file. This takes away conventional memory, even when you don't have a DOS window open. To only use DOSKEY when you open a DOS window: Right click on your DOS shortcut Select Properties Click on the Program tab Add DOSKEY > NUL to the Batch File field You can also add /INSERT if you prefer Showing DOS Error Codes
If you want to see what error codes are being generated by DOS programs, start your DOS session with the addition of a /Z parameter to the COMMAND.COM program. Changing Directories in DOS
Normally, you can move up one directory level by typing CD ..
If you have to enter a long path and program name in a DOS window, Open up the Explorer Go to the folder you want Drag it to the DOS window The path will be inserted into the window
(OR Copy the long string of text Right click on the DOS window and choose paste)
If you need a command before the long directory type the command in before drag and drop/pasting.
Having DOS Programs Prompt for Input When you normally create a shortcut for a DOS program, it does not prompt you for any input and just runs the program To change that, simply add a ? after the program name in the CMD field.
For example: C:\WINDOWS\COMMAND\EDIT.COM ? will start the DOS editor and prompt you for a file name to edit.
Easy way to open up DOS prompt in a specific directory
With the advent of long directory names, it can be difficult to open up DOS and CD to the directory you want particularly if it is several layers of long names deep.
An easy way is to: Open up Explorer and highlight the directory you want to be in Select Run / Command from the Start Menu Your DOS prompt will now be in the directory you highlighted in Explorer
For those who are experienced with editing the Registry, there is another way to make changes in environment variables. User environment variables are stored in the Registry in the key: HKEY_CURRENT_USER\Environment
System variables are found in the key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment