Change to Windows Home Directory in cmd

In the windows command prompt (or script), you can change directory to the users home folder as follows

cd %userprofile%

Use the D switch to change to the correct drive as well

cd /D %userprofile%

Or append values to find a relative folder

cd /D %userprofile%/this/folder/path/

Leave a Reply