How Do I Change Directory In Cmd
One of the reasons why many Windows users are deathly afraid of using the command prompt in Windows is because they simple don't know what to do when that blackness screen pops open.
It doesn't wait or deed like their favorite word certificate or browser program, and it gives you that "lost in space" feeling.
Ane manner to give yourself a sense of orientation when using the command prompt, is being able to navigate around the file system and into different folders. To practice this, you lot merely demand to know ii simple commands, and, acquire how to type less with a simple play a trick on.
First, open upward a command prompt by typing cmd in the Search bar on Windows 10, or clicking on Start \Run… and enter cmd in the run box on previous versions of Windows.
In one case the command prompt opens, take notice of the current direction location, which is your user directory.
Earlier you can navigate around, yous demand to exist able to encounter what's inside the electric current directory. To view the contents of the directory, simply use the Directory command by typing dir at the prompt and press Enter.
The dir command has many other options that yous can use such every bit, sorting the contents of a directory alphabetically, by size, type, date, etc.
To sort, you demand to apply the switch /O (followed by how you lot want to sort) with the dir command. For example:
- To sort by name alphabetically utilize:Â dir /ON
- To sort by size (smallest commencement) use: dir /OS
- To sort past date and fourth dimension (oldest first) utilize: dir /OD
Tip: To view all bachelor switch options that can be used, blazon dir /? at the prompt.
Ok, now we can see where were at and the contents of the directory we are currently in. Now let'south navigate around.
To move around, we need to use the Change Directory command: cd
And then, in your user directory, say you have a folder named Documents. To move into that directory, but type cd Documents at the prompt and press Enter.
At this signal yous tin use the dir command to list the contents of the Certificate folder. Only, say you wanted to keep moving through the directory?
Well. if you know the total path, you lot can only blazon information technology at the prompt ( cd C:\Users\wtn\Documents\Updater ). Merely, I stink at typing. So here's a little trick I mentioned at the kickoff of the article to make navigating a whole lot easier by typing less.
When you are using the cd command, instead of typing the directory name, printing the Tab key on your keyboard. This will list the folders (in the current directory). As y'all proceed to press the Tab fundamental each fourth dimension, Windows will list one by ane, each folder. When you lot see the folder you desire to change directory into, simply press Enter.
Now that's a whole lot easier than typing 😉
So far, I showed you how to move "forward" through a directory. But how practice you lot go backwards, or to a unlike part of the directory? Hither are some tips on how to move around:
When y'all list contents of a directory using the dir command, you volition notice the first two items in the list:
09/28/2008Â 05:16 PM .
09/28/2008Â 05:sixteen PM ..
The item with one period is the electric current directory and the item with double period is the parent directory (one folder above) of the directory are you in. And then to motility back or up i binder in the directory tree, type cd .. at the prompt and press enter.
- You tin can employ this command to move back through multiple folders in the directory tree by typing cd ..\.. (this volition movement you back two parent folders).
- If you just want to commencement at the height of the directory tree, which in this case is the root of the C:\ drive, just type cd C:\ at the prompt and press Enter.
- If you accept more than one drive letter on your reckoner, you can switch to that bulldoze the same way past typing cd E:\ at the prompt and press Enter.
Now that you tin meet how piece of cake it is to motion around and list directory contents here are some more tricks you can use to impress your friends:
Open up an Explorer Window from the Command Prompt's Current Directory
How To Call back Previous Used Commands From The Command Prompt (Win XP)
7 Tricks To Make Working With Windows Command Prompt Easier
Control Text Scrolling At The Command Prompt
Source: https://www.watchingthenet.com/how-to-navigate-through-folders-when-using-windows-command-prompt.html
Posted by: mowrytherabour1970.blogspot.com
0 Response to "How Do I Change Directory In Cmd"
Post a Comment