cd d:\projects
does not work
How can I set the current working drive and directory so that I can run msbuild scripts from there?
To change current working directory under the current drive, use command " cd new-path " (change directory). 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.
It is the directory from where you start the batch file. E.g. if your batch is in c:\dir1\dir2 and you do cd c:\dir3 , then run the batch, the current directory will be c:\dir3 .
If you want to know the current location, in which folder or directory you are while using Windows CMD (Command Line Interface), you can make use of cd command, Command: cd - This command can be used to displays the name of or to change the current directory.
This is also handy:
pushd D:\projects
You can then return to the directory you were previously at with:
popd
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With