1. Run multiple Windows commands from the command prompt
You can run multiple Windows commands in one go from the command prompt. For example, you can start or stop a service from a command prompt by typing "Net Start/Stop." What if you need to restart a service from the command prompt? In that case, you can use a double ampersand -- && -- which allows you to run multiple "Net" commands in one line to first stop and then restart the service.
2. Add a double ampersand to ends of lines to execute another command
You can add another double ampersand at the end of the line to execute any other command. For example, the first command here is executed to list the files in C:\Temp directory, and then next two commands are executed to stop and restart the Windows Time service.
Similarly, you can mix any Windows commands, but make sure to separate them with a "&&." This function also works for Windows XP.
3. Using Windows Clipboard from a command prompt
As you know, CTRL+C allows you to copy selected contents to Windows Clipboard, and the CTRL+V key combination is used to paste the contents from Windows Clipboard. In the command prompt, the CTRL+C key combination does not work. However, you can use the "clip" function, provided by the Windows 16-bit subsystem, to capture output of a command and store it in the clipboard.
Note that this will work for any command.
Once stored in the clipboard, open Windows Notepad or an editor of your choice and use the CTRL+V key combination to read and paste the contents from the clipboard.
Be aware that this command isn't available in Windows XP, so you must copy it from a computer running Windows 7 or later to a Windows/System 32 directory.
4. Clearing Windows Clipboard contents from the command prompt The contents stored in Windows
Clipboard can eat up memory. You must clear the Windows Clipboard to make sure memory used by the contents is available back to the operating system. To clear contents, use the command "Echo Off."
This is a special command, and when executed with the "Clip" command, it clears the contents from Windows Clipboard.
5. Open command prompt from a folder using Open command window here
"Open command window here" is available on the right-click context menu of a folder in Windows Explorer. This command can save you a lot of time getting to folders via Command Prompt. You must hold the Shift key while you right-click the folder to see this action
0 blogger:
Post a Comment