Sunday, 5 November 2017

Watch Star Wars Episode IV

21
of 21

Watch Star Wars Episode IV


Screenshot of the ASCII Star Wars trick in Command Prompt

Yes, you read that correctly, you can watch an ASCII version of the full Star Wars Episode IV movie right in the Command Prompt window!
Just open Command Prompt and execute telnet towel.blinkenlights.nl. The movie will start immediately. Check out the tip below if this doesn't work.
True, this isn't a terribly productive use of the Command Prompt, nor is it really a trick of the Command Prompt or any command, but it sure is fun! I can't imagine the work that went in to this!
Tip: The telnet command isn't normally enabled in Windows but can be turned on by enabling Telnet Client from Windows Features in the Programs and Features appletin Control Panel. If you'd rather not enable Telnet but would like to see the movie, you can also watch it in your browser at Star Wars ASCIIMation.

Copy and Paste Easier With QuickEdit Mode

20
of 21

Copy and Paste Easier With QuickEdit Mode


Screenshot of the QuickEdit Mode option in Command Prompt

A number of these Command Prompt tricks have dealt with making copying and pasting easier. So, how about an even easier way to copy from the Command Prompt (and a secret way to easily paste)?
Bring it on, right?
Just right-click on the Command Prompt title bar and select Properties. On the Options tab, in the Edit Options section, check the QuickEdit Mode box and then click OK.
Enabling QuickEdit Mode is like having Mark enabled all the time, so selecting text to copy is really easy.
As a bonus, this also enables an easy way to paste into the Command Prompt: just right click once and whatever you have in the clipboard is pasted in the Command Prompt window. Normally, pasting involves right-clicking and selecting Paste, so this is still a bit different than you're used to.

Find a Website's IP Address

19
of 21

Find a Website's IP Address


Screenshot of the nslookup and ping command

Like to know the IP address of a website? You can use the nslookup command or the ping command, but the former is probably faster.
First, let's use the nslookup command to find the IP address of lifewire.com:
Just execute nslookup lifewire.com and view the result. Make sure you don't confuse any private IP addresses that also show up in the nslookup results alongside the public IP address of lifewire.com, which is what IP address we're after.
Now let's try using the ping command to find it:
Execute ping lifewire.com and then look at the IP address between the brackets in the first line shown. Don't worry if the ping command "times out" during execution; all we needed here was the IP address.
You can use the same procedure with any website or any hostname on your local network.

Automatically Complete Commands With Tab Completion

18
of 21

Automatically Complete Commands With Tab Completion


Illustration of the tab function

Tab completion is another Command Prompt trick that can save you lots of time, especially if your command has a file or folder name in it that you're not completely sure of.
To use tab completion in the Command Prompt, just enter the command and then the portion of the path that you do know, if at all. Then press the tab key over and over to cycle through all of the available possibilities.
For example, let's say you want to change directories to some folder in the Windows directory but you're not sure what it's named. Type cd c:\windows\ and then press tab until you see the folder you're looking for.
The results cycle in order or you can use SHIFT+TAB to step through the results in reverse.
You know how your smartphone's texting app automatically guesses what it is you want to type next? Tab completion in Command Prompt is sort of like that... only better.

Access Previously Used Commands With the Arrow Keys

17
of 21

Access Previously Used Commands With the Arrow Keys



Photo of arrow keys on a black keyboard


Another great Command Prompt trick has to be the use of the keyboard arrow keys to cycle through previously executed commands.
The up and down arrow keys cycle through the commands you've entered and the right arrow automatically enters, character by character, the last command you executed.
This might not sound that interesting, but there are several situations where the arrow keys become huge time savers.
Consider this example: You've typed out 75 characters of a command and then try to execute it, only to find that you forgot to add an option at the very end. No problem, just hit the up arrow and the entire command is automatically entered in the Command Prompt window, ready for you to edit to make it work.
Granted, I work in the Command Prompt a lot, but I'd guess this little trick has saved me many hours of repeat typing over the years.

Map a Local Folder Just Like a Network Drive

16
of 21

Map a Local Folder Just Like a Network Drive


Screenshot of a local folder mapped like a network drive

The net use command is used to assign shared drives on a network to your own computer as a drive letter, but did you know there's another command that can be used to do the same thing to any folder on any of your local hard drives?
There is, and it's called the subst command. Just execute the subst command, followed by the path of the folder you wish to appear as a drive.
For example, let's say you want your C:\Windows\Fonts folder to appear as the Q:drive. Just execute subst q: c:\windows\fonts and you're set!
This Command Prompt trick makes accessing a particular location from the Command Prompt much easier.
Tip: An easy way to delete the "network drive" example here is with the subst /d q:command. Just replace the q: with your own drive letter.

View Your Computer's Important Network Information

15
of 21

View Your Computer's Important Network Information


Screenshot of an IPCONFIG ALL execution in Command Prompt

Maybe just for your own information, but certainly when you're troubleshooting a network or internet problem, you'll probably at some point need to know details about your computer's network connection.
Everything you'd want to know about your network connection is available somewhere in the Control Panel in Windows, but it's much easier to find, and much better organized, in the results from the ipconfig command.
Open Command Prompt and execute ipconfig /all.
What displays on screen next is everything important about your network connection: your IP address, hostname, DHCP server, DNS information, and much, much more.
Combine this hack with the one about redirection operators that you learned about several slides back and you've got a very easy way to get information about your connection to someone helping you with a problem.

Use Robocopy as a Backup Solution

14
of 21

Use Robocopy as a Backup Solution


Screenshot of using the ROBOCOPY command

Thanks to the robocopy command, you don't need to use Window's backup software or install a third party program to manage your backups.
Just execute robocopy c:\users\ellen\documents f:\mybackup\documents /copyall /e /r:0 /dcopy:t /mir, obviously replacing the source and destination folders with whatever you'd like to backup and where it should go. The robocopy command with these options functions identically to an incremental backup software tool, keeping both locations in sync.
You don't have the robocopy command if you're using Windows XP or earlier. However, you do have the xcopy command, which can be used to do something very similar: xcopy c:\users\ellen\documents f:\mybackup\documents /c /d /e /h /i /k /q /r /s /x /y.
No matter which command you choose to use, just create a script file containing the command and schedule it to run in Task Scheduler, and you'll have your own custom made backup solution.
I use a cloud backup service at my home, and recommend that you do too, but there were years where I chose to use the robocopy command as my only local backup solution because I liked the level of control it gave me. Hopefully you take that as a vote of confidence in this incredibly useful Command Prompt trick.

Shut Down or Restart Another Computer

13
of 21

Shut Down or Restart Another Computer


Screenshot of the Remote Shutdown Dialog in Windows

System administrators in a business environment do this all the time for lots of reasons, but you can also shut down or restart another computer on your network, all from your computer's Command Prompt.
The easiest way to shut down a computer remotely is to execute shutdown /i from the Command Prompt to open the Remote Shutdown Dialog, shown here.
Just enter the name of the remote computer (which you can get by running the hostname command on the other PC), choose what you want to do (restart or shutdown), select some other options and then click OK.
So whether you're brushing up on your command skills or just scaring a family member, this Command Prompt trick is a fun one.
You can also shut down or restart another computer strictly from the Command Prompt with the shutdown command, without using the Remote Shutdown Dialog.

Drag and Drop For Easy Path Name Entry

12
of 21

Drag and Drop For Easy Path Name Entry


Screenshot of the Drag and Drop feature in Command Prompt

Most Command Prompt commands require you, or have options, to specify full paths to files or folders, but typing out a long path can be frustrating, especially when you miss a character and have to start over.
For example, in Windows 10, the path to the Accessories group in my Start Menu is C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories. Who wants to type that all in manually? I don't.
Fortunately there's a Command Prompt trick that makes this much easier: drag and drop.
Just navigate to the folder you want the path for in Windows Explorer. Once there, drag the folder or file to the Command Prompt window and let go. Like magic, the full path is inserted, saving you a considerable amount of typing depending on the length and complexity of the path name.
Note: Unfortunately, the drag and drop feature does not work in an elevated Command Prompt. At least you learned a few tricks back how to open one of those a bit quicker!

Open the Command Prompt From Any Location

11
of 21

Open the Command Prompt From Any Location



Screenshot of the Open Command Window Here option

If you've ever worked in the Command Prompt for very long, you know that it can be really frustrating executing the cd/chdir command over and over (and over) again to get to the right directory you want to work from.
Fortunately, there's a super easy Command Prompt trick that will let you open a Command Prompt window from whatever folder you're viewing in Windows.
All you have to do is navigate, in Windows, to the folder you'd like to start working from once in Command Prompt. When you're there, hold down the Shift key while you right-click anywhere in the folder.
Once the menu pops up, you'll notice an entry that's not usually there: Open command window here.
Click that and you'll start a new instance of the Command Prompt, ready and waiting at the right location!
If you're a Command Prompt power user, you'll immediately recognize the value in this little trick.

Copy Text From the Command Prompt

10
of 21

Copy Text From the Command Prompt


Screenshot of the Mark Feature in Command Prompt

As you may or may not know, copying from the Command Prompt is not as easy as copying from other programs, which is part of the reason why saving a command's output to a file, which you learned about a few tricks back, is so handy.
However, what if you do just want to copy a short section of text to the clipboard? It's not too hard but it's not very intuitive either:
  1. Right-click anywhere in the Command Prompt window and choose Mark.
  2. Now, highlight with your left mouse button whatever you'd like to copy.
  3. Once your selection is made, press Enter.
Now you can paste that information into whatever program you'd like, just like you paste other text.
Tip: If you chose Mark but then decided you don't want to copy anything, you can right-click again to cancel the Mark action, or hit the Esc key.

Customize the Command Prompt Title Bar Text

09
of 21

Customize the Command Prompt Title Bar Text


Screenshot of a custom title bar on a Command Prompt window

Tired of that Command Prompt title bar text? No problem, just use the title command to hack it to say whatever you like.
For example, let's say your name is Maria Smith, and you want to express your ownership of the Command Prompt: execute title Property of Maria Smith and the Command Prompt's title bar will change immediately.
The change won't stick, so the next time you open Command Prompt the title bar will be back to normal.
The title command is usually used to help give a custom appearance in script files and batch files... not that I'm saying titling it with your name isn't a good idea!

View a Drive's Entire Directory Structure

08
of 21

View a Drive's Entire Directory Structure


Screenshot of the tree command in a command prompt

I think one of the neatest little commands is the tree command. With tree, you can create a kind of map of the directories on any of your computer's drives.
Execute tree from any directory to see the folder structure under that directory.
With so much information created with this command, it's probably a good idea to export the results of tree to a file so you can actually look through it.
For example, tree /a > c:\export.txt, just as explained in the last Command Prompt trick about redirection operators.

Save a Command's Output to a Fil

07
of 21

Save a Command's Output to a File



Picture of the output of an instance of the systeminfo command

An incredibly useful Command Prompt trick is the use of redirection operators, specifically the > and >> operators.
These little characters let you redirect the output of a command to a file, giving you a saved version of whatever data the command produced in the Command Prompt window.
For example, let's say you're about to post a computer problem to an online forumand you want to provide really accurate information about your computer. An easy way to do that would be to use the systeminfo command with a redirection operator.
For example, you might execute systeminfo > c:\mycomputerinfo.txt to save the information provided by the systeminfo command to that file. You could then attach the file to your forum post.
See How to Redirect Command Output to a File for more examples and a better explanation of how to use redirection operators.

Edit Websites in Browser (Live)

                                        Edit Websites in Browser (Live) Imagine a world where you are a God and have ultimate control ...

ALL POST