Command Prompt Commands Tricks

1. Copy CMD output directly to clipboard

IT guys run some command prompt commands and then to share the output, they copy paste the output by right clicking cmd and marking the stuff and pressing enter, then paste. This is lots of unecessary work 😉 and waste of time.

Here’s the command prompt trick, type in your command for example, ipconfig and postfix ‘ | clip ‘ to directly copy your cmd output to clipboard.


now, Select Paste to paste the stuff directly to notepad, TADAA…! Awesome, ain’t it? 😀 🙂


2. Open Command Prompt in a specific Folder

CMD usually opens up in either User or System folder depending upon whether you ran it as administrator or not.
If you want to run a particular file in a specific folder (suppose d:\docs\bills.txt), then your approach will be CMD >  (Change directory) cd d:\docs\ so that command prompt can navigate to the location, then you will run the Bill.txt file.

Now here is the Command prompt trick 🙂 , just navigate to the folder and press and hold SHIFT KEY and then Right click and you will see a popup menu with some extra items, like the one in below picture.


Select open command window here  to directly open the CMD prompt with the path to that folder directly.

3. Run CMD as Admin

You can simply press Ctrl+Shift+Enter to open command prompt with admin privileges or an Elevated command promt. This Command prompt trick will work for all the programs installed on your system.

4. CMD  History

Check last used command prompt commands in a session using the navigation (Up, Down, Left, Right ) buttons, but you can see list of all the commands by pressing the F7 button.


5. Drag and Drop Files to Change Path

If you are already in command prompt, and you want to copy the exact path to a folder or file to run the file or change the present working directory, you can simply drag and drop file or the folder on the command prompt.

6. Run Commands Simultaneously

You can put && between two commands and execute them one after another. The command on the left will execute first followed by the command on the right of the double ampersand.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: