echo %cd% - displays the current path of the directory
cd "C:\path\to\some\directory" -changes the path of the directory
cd "%variable_containing_directory_path%" - also changes the path of the directory
cd /d E: - change to E: drive from a different drive
cd/ - changes directory back to current drive
echo %__CD__%
- displays the current path of the directory with trailing backslash (undocumented)
echo %=C:% - The current directory of the C: drive (undocumented)
echo %=D:% - The current directory of the D: drive if drive D: has been accessed in the current CMD session (undocumented)
Why is it important and what are they uses and advantages: