Cd command in Windows

The cd command displays the name or changes the current directory. If used only with a drive letter (eg cd C :), the cd command displays the name of the current directory in the specified drive. If used without parameters, the cd command will show the current drive and directory.

Note : This command is the same as the chdir command.

Syntax

 cd [/ d] [:] [] 
cd [.]
chdir [/ d] [:] []
chdir [.]

Parameters

ParameterDescription / d Change the drive as well as the current directory for a drive. : Specify the drive to display or change (if different from the current drive). Specify the path to the folder you want to display or change. [.] Specifies that you want to change the root directory. /? Show help at the command prompt.

Note

If the command extension is enabled, the following conditions will apply to the cd command:

  1. The current directory string is converted to use the same case with the name on the drive. For example: cd C: TEMP will put the current directory into C: Temp if that happens on the drive.
  2. Spaces are not considered delimiters, so the path may contain spaces without quotes. For example:
 cd usernameprogramsstart menu 

Like:

 cd "usernameprogramsstart menu" 

However, quotes are required, if the extension is disabled.

To turn off the extension, enter:

 cmd / e: off 

For example

The root directory is the top part of the directory hierarchy for a drive. To return to the root directory, type:

 CD 

To change the default folder on the drive (the folder is different from the folder you are accessing), enter:

 cd [: []] 

To verify changes to the directory, enter:

 cd [:] 

See more:

  1. Summary of DOS commands in MS-DOS
  2. The autochk command in Windows
  3. The atmadm command in Windows
5 ★ | 1 Vote

May be interested

  • Openfiles commands in WindowsPhoto of Openfiles commands in Windows
    allows administrators to query, display, or disconnect files and folders that have been opened on the system. in addition, this command can also license or disable the maintain objects list system.
  • Why does Windows use backslashes?Photo of Why does Windows use backslashes?
    modern software has mostly auto-correction functions when you enter the slash incorrectly, so it doesn't matter which slash type you usually use but recognize the difference between the two types of slashes this crossover in windows is sometimes also necessary.
  • Stolen bank account with Trojan BankingPhoto of Stolen bank account with Trojan Banking
    today with the development of the digital age, online banking transactions are no longer strange. and the malware developer has released a kind of trojan used to steal users' bank accounts.
  • Perfmon command in WindowsPhoto of Perfmon command in Windows
    start windows reliability and performance monitor in a specific independent mode.
  • What kind of file is M3U8 file?Photo of What kind of file is M3U8 file?
    a file with a .m3u8 extension is a file that contains utf-8 encoded audio playlists
  • Distinguish common network cablesPhoto of Distinguish common network cables
    electromagnetic shielding / screening is made of a sheet of metal / polyester or metal wire, surrounded by individual pairs of wires or all wires. this article will help you differentiate some types of ethernet cables.