![]() Enclosed with double quotes if pathname contains blank. C:\.> cd \ // Set current directory to the root directory of the current drive C:\> cd Windows // Set current directory to "Windows" relative to current directory of the current drive C:\Windows> cd system // Set current directory to "system" relative to current directory of the current drive C:\Windows\system> cd \myproject\java // Set current directory absolutely to "\myproject\java" of the current drive C:\myproject\java> cd "\Program Files\java\jdk1.7.0_07\bin" // Set current directory absolutely. For example, prompt> c: // Set current drive to C. A relative path is relative to the current working directory and does NOT begin with a leading " \". An absolute path begins with a " \" or root directory. You can specify new-path in two ways: absolute or relative. ![]() It is important to take note that you need to set the current drive first (via " x:" command) before setting the current directory under the current drive. To change current working directory under the current drive, use command " cd new-path" (change directory). Take note that commands are NOT case-sensitive in CMD. D:\.> c: // Change the current drive to C. To set or change the current drive, enter the drive letter followed by a colon ( :), e.g., prompt> d: // Change the current drive to D. All relative pathnames are relative to this current drive and current working directory. Current Drive and Current Working DirectoryĮach CMD session maintains a so-called current drive and current working directory, which is shown in the prompt in the form of " drive:\path\to\current-directory>". You can enter your command after the prompt. The CMD displays a prompt which ends with a " >", in the form of " DriveLetter:\path\to\current-directory>", e.g., " C:\Windows\System>".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |