Change Directory

For your second command, you will learn how to change your working directory. To change directory, use the CD command.

In Command Prompt, type CD .. and press enter.

In the above screenshot, I typed cd .. and my working directory changed from C:\Users\Kristofer\Documents\test to the directory above, C:\Users\Kristofer\Documents. Now I can use dir to see all the files and folders in this directory. If I want to go back to my test folder, I can type cd test.

If you are in your file system root directory, for example C:\ or H:\, then you can’t go up a directory. See the directory contents and go down somewhere instead.

If you want to change to a directory with a space in the name, surround the name with quotation marks. For example: cd "my folder with spaces".

Before moving on, navigate around your folders using cd and seeing their contents with dir.

Prev ————————– Next

Leave a Reply

Your email address will not be published.