Command Prompt Tricks and Hacks

         The Tools Command Prompt window, and many commands, may seem boring or even are relatively useless at first glance, but as people WHO have never used the Command Prompt very often can tell you, there are lots of love!

        Here are a few other tricks and hacks the Command Prompt Command Prompt that I guarantee will make you happy about a lot of Earthly Voice Command Prompt commands such as telnet, tree, or ... okay robocopy, robocopy sounds cool.

         Some tricks and hacks Command Prompt are special features or use the Command Prompt itself, while others are just things that are neat or are relatively unknown to what you can do with a specific command. Enjoy!

Use Ctrl-C to abort the command
1. Use Ctrl-C to abort the command

Almost all orders can be stopped in its tracks with an abort command: Ctrl-C.

If you have not actually run the command, you can backspace and delete what you've typed, but if you have executed it then you can do a Ctrl-C to stop it.

Warning: Ctrl-C is not a magic wand and can not undo the things that can not be returned has been done, such as partially completed command format. However, for things like the dir command that seems to go on forever or questions on the prompt that you do not know the answer, abort command is Command Prompt trick very good to know.

 page one of the results of the command
2. view page one of the results of the command (or Line) at a time
Never run commands, such as dir command, which generates so much information on the screen virtually useless? You are not alone.

One way is to run a command with a specific way so that the resultinginformation will be displayed to You a page, or a single line, at a time.

To do this, type the command, a command such as dir, and then follow it up with pipe redirection operator and then a lot more orders.

For example, executing dir/s | more will generate thousands of lines of the results you would expect from a dir command, but it will stop the order withthe results page-more-at the bottom of the page, indicating that thecommand was not done running.
Just press the space bar to advance the page or press the Enter key to advance one row at a time.

Run Command Prompt as Administrator Automatically 

3. Run Command Prompt as Administrator Automatically 
Many commands require you execute them from an elevated Command Prompt in Windows - in other words, execute them from the command prompt run as administrator. 

You can always right-click on the Command Prompt shortcut and select Run as administrator but create a shortcut to do the same thing can be a big time saver if you are a frequent user of electricity Command Prompt. 

To complete this Command Prompt trick, just create a shortcut on the desktop Command Prompt, enter the shortcut properties and then select Run as administrator box located on the Advanced button on the Shortcut tab.

being a power user Command Prompt with function keys
4. being a power user Command Prompt with function keys
The fact that the function keys actually do something on Command Prompt isone of the best kept secrets in the tool:

F1: Paste the last executed command (character by character)
F2: Paste the last run command (until the character is inserted)
F3: Paste the last run command
F4: clear the current text into characters who inducted
F5: Pasta recently executed commands (Do not cycle)
F6: Pasta ^ Z to prompt
F7: display a list of previously executed command selected
F8: the Pasta was recently executed commands (cycle)
F9: asking for the number of orders from the list to insert an F7

Prompt Text Change -
Prompt text hack

5. Prompt text hack
Did you know that the prompt in the Command Prompt is completely customizable thanks to the command prompt? That, and when I say adjusted, I mean really adjusted.

Instead of C:\ says, you can set the prompt for any text you want, and that includes the current time, the drive, the Windows version number, you name it.

One example is a useful prompt $p$g$m that will display the complete path of the mapped drive in the prompt, along with a drive letter.

You can always execute only, without prompt option, to return to the settings is sometimes boring.

Get help for any command 
6. Get help for any command 
Believe it or not, the help command does not provide assistance to any command Command Prompt. However, any command can be suffixed with /? option, usually called switches help to display detailed information about the command syntax and often times even a few examples. 

I doubt that the switch Command Prompt help cool tricks you never heard of, but it's hard not to agree that it is one of the more useful. 

Unfortunately, the command help or assistance switch offers many avenues to explain how to interpret the syntax. See how to read command syntax if you need help with it.

save command output to File 
7. Save command output to File 
A very useful trick is to use the Command Prompt transfer operators, especially saying and >> operators. 

Minor characters let you redirect the command output to a file, give you a saved version of data produced every command in the Command Prompt window. 

For example, let's say you are going to write an online forum for computer problems and you want to give the information is completely accurate on your computer. An easy way to do this is to use the systeminfo command with redirection operators. 

For example, you might run systeminfo say c: \ mycomputerinfo.txt to store the information provided by the systeminfo command to a file. You can then attach the file to your forum post. 

See how to redirect command output file for more examples and better explanations about how to use the redirection operator.

Directory Structure with Tree Command -
entire directory structure Drives 
8. See the entire directory structure Drives 
I think one of the neat little command is the command tree. With, you can create a sort of map directories on one drive of your computer. 

Run from any directory tree to see the structure of folders under that directory. 

Tip: with so much information, it's probably a good idea to export the results of a command to a file tree. For example, a tree / a> c: \ treeresults. txt,
Command Prompt Title Bar -
Adjust the Command Prompt Title Bar Text
9. Adjust the Command Prompt Title Bar Text
Tired of that Command Prompt title bar text? No problem, simply use the command title hack say whatever you like.

For example, let's say your name is Mary Smith, and you want to reveal your ownership over: executes the Command Prompt title Property of Mary Smithand the title bar of the Command Prompt will change soon.

The changes will not stick, so the next time you open Command Prompt titlebar will return to normal.

The title command is usually used to help give a custom look in the file scriptand batch file ... not that I'm saying the title with your name is not a good idea!

Mark Feature in Command Prompt -
adjust the Command Prompt Title Bar Text

10.adjust the Command Prompt Title Bar Text
As you may or may not know, copying from the Command Prompt is not as easy as copying from another program, which is part of the reason why savethe output of a command to a file, a Command Prompt Trick # 7, very useful.

But what if you just want to copy a section of text to clipboard short? It's not too hard but not very intuitive either.

Right-click anywhere in the Command Prompt window and select Mark. Now,highlight it with the left mouse button You whatever it is you want to copy.Once your selection is made, press Enter.

Now you can paste the information into the program whatever you want.


Category Article

What's on Your Mind...

Powered by Blogger.