Posted by T.J. Barbour on Mon, Jan 1, 0001
In
Tags

#Step up your CMD game

Create a directory for your scripts, I suggest “C:\Scripts”

  1. Hit WINDOWS key (to search) > type cmd > right click on cmd.exe > pin to taskbar
  2. Right click on cmd on taskbar > right click on “Command Prompt” > click Properties
  3. Under “Target” append the text /K “cd C:\Scripts”
  4. Click “Advanced…”
  5. Check the “Run as administrator” checkbox
  6. OK out of all the dialogs
  7. Click on the CMD taskbar icon (Or use WINDOWS+SHIFT+# where # is the index on your taskbar

Voila, you are in your scripts folder. You can drop scripts here that you use frequently to automate more.

Another small trick: When you are about to run a command you find yourself doing often do it this way instead:

  1. type out the command as you normall would, but DON’T execute!
  2. HOME back to the beginning of the command
  3. type ECHO in front of the command
  4. END to the end of the command
  5. Type > something.bat
  6. Execute the command

This will write your command out to a file, you can try running it (something.bat) and edit it as needed etc.