cd in command prompt code example

Example 1: cd command

The cd command can be used to change into a subdirectory,

cd subdirectory_name						-> To go one level into subdir
cd subdirectory_name/subsubdirectory_name	-> To go two levels into subdir

move back into the parent directory,

cd ..\       -> To go back one level
cd ..\..\    -> To go back two levels

move to previos directory,

cd -

move all the way back to the root directory or move to any
given directory

cd C:/Give_Path_to_directory

Example 2: how to change drive in command prompt windows 10

if you wanted to change the drive from "C:" to "D:", you should type "d:"

Example 3: change directory cmd

cd  
comment to change directory in the cmd

Example 4: cd command windows

cd <folder>