use cmd.exe to change directory and run command in that directory
cmd
Solution
You may want to invoke CD with the /d option, thus not only changing the current directory on drive c: but also going there (in case you are not already on that drive).
cmd /c "cd /d c:\temp && dir"
Problem
All I want to do is: - change to specific directory of a different drive - run a command in that directory e.g. dir I need to do this in one line using cmd.exe starting from a different drive I would do this like this: ``` c: cd temp dir ``` so in one statement so far I have: ``` cmd /c c: & cd\temp & dir ``` But this just gives me dir for the P: directory which I start from. How can I get dir returned from c:\temp? I can't run a batch file and it must be in a one-line statement.