banner



How To Change The Directory In C#

The Control prompt, sometimes also referred to as cmd.exe in short, is a command line interpreter in Windows operating system, and has been in use since the earliest days of Microsoft operating systems, dating back to the DOS days.

Offered equally an culling to Windows GUI, the command prompt offers far more control and functionalities to the average Windows user, than the normal GUI ever can.

But, earlier you tin can perform any wizardry with the Command prompt, yous'll get-go have to learn how to change directories in it. In this article, nosotros've covered some of the easiest methods to alter your Command prompt directory in Windows x/eleven.

Let'due south jump right in.

three ways to change the Command prompt directory

There are a plethora of ways to change the Command prompt directory on Windows 10/xi. First, we'll begin with what is almost probably the about straightforward of them all: the cd command. Let's get.

Change your Command prompt directory with cd command

The cd command, short for Change Directory, lets yous jump from one directory (folder) to some other without any hassles.

Only blazon in 'cd' in the Command prompt and hit Enter. From there, you'll be taken to the top of your Command prompt directory instantly. As you lot will run across on your Command prompt screen, y'all'll be taken to the root directory in Windows "C:" drive.

To movement in to a item directory, just enter cd followed by the directory proper name . For instance, nosotros moved in to the Downloads directory located inside the root directory of our Windows 10 here.

For multiple word directories, yous may have to enclose the name in quotes, for example cd "onenote notebooks"- one tip here, yous tin can outset typing a directory proper name, and and then hit the tab central, and Windows will fill in the name for you. If you have multiple directories with similar names (say files 1, files 2, files three, etc) go along hitting the tabfundamental and Windows will cycle through the possible matches.

changing directories in the cmd

Alternatively, instead of going straight to the root directory, y'all can too go back to the previous folder by adding ..  afterwards cd command. So, become into your Control prompt, blazon in cd .., and striking Enter,as we've washed in our Windows 11.

running the cd command in cmd

Irresolute the drive in Command prompt

If, in contrast, you want to modify your directory birthday, and so you'll have to type the drive proper name, followed by :. And then, if you're in the "C:" drive right now, and you'd like to motility in to your "D:" bulldoze, but type in "D:" in the Command prompt and hit the Enter.

Another thing to proceed in mind is that the Command prompt is case-insensitive, meaning that it treats capital and minor case letters as the same. Then, it doesn't affair if you lot type "D:" or "d:"—the Command prompt volition translate both of them as the same.

Another command that deserves a special mention is the dir control. Type in the dir in the Command prompt and you lot'll meet a list of files and folders inside the parent directory.

running dir command in cmd in windows 11

At present, if yous want to go inside a specific directory from here, only use the cd control from above, along with the name of the directory, as we did above.

Alter directories in CMD by dragging the folder

You can also utilize the GUI along with the Command prompt here. Type in cd in the Command prompt, drag the folder that you want to motion in into the Terminal, and hitting Enter.

The Control prompt will straight switch to the desired folder.

Changing directories in  CMD (Command prompt)

If becoming a Terminal pro is what you lot're after, and so being able to modify your last directories is merely ane of many hacks y'all'll be mastering forth the way. Make no mistake, as this is only the beginning, and you'll be learning a lot more when you lot dive into the Command prompt more deeply.

Share This Post:

How To Change The Directory In C#,

Source: https://www.onmsft.com/how-to/change-directories-command-prompt-windows-10-11

Posted by: neubauersoman1985.blogspot.com

0 Response to "How To Change The Directory In C#"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel