How to reach a folder location easily when using the command prompt

Sometimes it is very frustrating to type the names of many folders to reach a particular folder when using the command prompt. This is usually necessary when you have to open a file or execute a script using the command prompt. Here are a few simple techniques to save you a lot of time.

If you don't have access to the graphical user interface, then you can take the help of the <Tab> key on your keyboard. For eg:

C:\Program Files\Start Menu X\Skins>

Let's say this is the location you want to reach. You don't have to type the whole thing.

Type "cd C:\Pro" and then hit the <Tab> key. This will auto fill to C:\Program Files\.

Then if you are not sure of the next folder, but you know it starts with 'S', then type

C:\Program Files\S

and <Tab> and again <Tab> and this till give show you all the folders within Program Files that start with 'S'. Hit <Tab> until you find the folder you are looking for.

C:\Program Files\Start Menu X\

I was looking for this location.

So using the <Tab> key will save you a lot of time especially when you have large folder names.

It is easier to reach a location in the command prompt if you have access to the command prompt.

We are now in this folder :

Let's say you want to reach "C:\Users\user\Downloads>". You can do this manually by using the commands "cd\" to go to the root folder and then again typing the location or using the <Tab> key as mentioned above.

Or, you can go to the location directly using the GUI.

Type "cd" in the command prompt and then click on the desired folder and drag it inside the command prompt window.

This is what you'll get.

Now hit enter and you'll reach the folder directly.

Dragging and dropping the location or using the <Tab> key in the command prompt will save you a lot of time and effort.

No comments:

Post a Comment