Hello YouTube.
This is Praveen for TechEmpty.
In this video I will be showing you the 14 Command prompt tricks that you should know.
So, without any further ado let’s get started.
First one.
Abort a Command.
Do you think the command that you ran is taking forever to display the result, then you can
use this command to abort the running task.
Press Control + C to kill the running task in Command Prompt window.
The Abort command is an excellent Command Prompt trick that you should know.
Second one.
View Results in One Page This command comes handy when you have huge
list of directories or files to view.
For example, let me list down the directories and subdirectories within C drive.
I’m typing dir /s This command will bring a list of directories
and also the subdirectories within the selected drive which in my case is C drive.
I’m aborting the action by pressing Control + C.
So, to view all the subdirectories page by page, we need to add, |more at the end of
the command.
Let us test it.
Dir /s |more.
Press Enter key to list the directories line by line.
To abort, use Control + C. How cool is that!
Third one.
Change the Prompt Text Have you ever thought of changing the path
text within the Command Prompt?
You can do that of course.
Type prompt DesiredName$g then press enter.
Awesome.
right?
To know the list of special codes, type ‘help prompt’.
Here $g means greater than symbol.
To get the default path, type ‘prompt’.
This will bring you the previous default path.
Fourth one.
Get help for any command.
This is one of the best Command Prompt trick that you should know.
If you would like to know the function of a particular command then you should use this
help switch.
Type the command followed by /?. For example I would like to know about the ipconfig command.
So I’m adding /? To it to know what the command exactly do.
You won’t get any detailed answer by this command but it helps to some extent.
Fifth one.
Save the output of a Command.
Firstly, make sure to run the Command Prompt in Administrative rights.
To do this search for CMD then right click on the Command prompt icon then select Run
as administrator.
You can achieve this action of saving the command’s output to a file by using a redirection
operator like greater than symbol >. Run the command that you would like to share the result
with the community.
For example, I would like to share my computer information.
So, I’m typing systeminfo followed by > then the path to save the generating text file.
Here in my case I’m saving the file to C drive.
Now you can share this file to anyone that you are getting support from.
Sixth One.
View Directory Structure This is one of the coolest Command Prompt
trick I ever tried.
You can list down all the directories and subdirectories in a structured format by a
simple command called tree.
Go to the drive and then type ‘tree’.
All the folder which are in the particular drive will be displayed exactly as shown on
the console.
Try it now.
Seventh One.
Change the Command Prompt Title See the title of the Command prompt window.
Don’t you thing that is boring?
Let’s change it to something else.
Type title followed by you desired text.
In my case I’m changing it to You are Awesome.
Eighth One.
Get the File Path Automatically One of the best handy Command prompt trick
that worth tying.
Stop typing the whole path of the file to execute a command.
Instead, go to the file location then hold you Shift key then right click on the window.
Now choose ‘Open Command Prompt here’ which will take the location path automatically
for you.
Ninth One.
View Network Information Would you like to check the network information
like adapter status, Default gateway IP address etc then you should try ipconfig /all command.
You can export the data using redirection operation which I have shown before in the
same video.
Tenth one.
Check the IP address of any website You can check the IP address of a particular
website by using nslookup command.
Type nslookup followed by the website url.
For example nslookup techempty.org to know its IP address.
Eleventh Command.
Execute Multiple Commands at the same time.
Save time in executing multiple commands at the same time using AND operator.
Join multiple commands with two AND operators to run all the commands in the same time period.
For example I’m trying to list the directories and would like to clear the result.
So, typing dir && cls.
This is really cool.
Twelfth Command.
Hide folders and files This is the lesser known Command Prompt trick.
It is possible to unhide the hidden folder when you use the general hidden feature in
Windows.
Instead of using traditional method to hide a folder or file, we use Command prompt to
do the same thing.
But it is highly impossible to know the hidden file except the one who hides it through Command
prompt.
Let’s do this.
Firstly open the command prompt at the location of the source folder or a file that you would
like to hide.
Hold the Shift key and right click anywhere on the window.
Now list the available directories by typing ‘dir’ command.
Now type ‘attrib +h +s +r foldername’ in my case it is techempty.org.
Here + stands for holding, h stands for hiding, s stands for system and r stands for read
only.
To unhide the same folder, type attrib –h –s –r where you are releasing the hidden
folder.
Thirteenth One.
Create WiFi Hotspot.
I have done a dedicated tutorial on the same.
Please check it to know how you can create portable Wifi hotspot using Command prompt.
You will love this.
Fourteenth One.
Change Text Color You can even change the color of the Command
Prompt text within few seconds.
To do this, type ‘help color’ to list down all the available colors.
So now, use color command followed by the specific color attribute.
For example I’m choosing Red.
So type color 04.
How cool is that?
That’s it.
If you have any issues do comment below or contact me directly on facebook.
Do share or thumb up this video if it found useful.
Please don’t forget to subscribe to our channel for more awesome videos like these.
Your contribution is more to us.
This is Praveen Signing off.
Hope to see you in my next video.
Thank you.