batch-file Changing Directories and Listing their Contents Changing drive without CD /D


Example

Pushd "D:\Foo"
Dir
Popd

Pushd will change the directory to the directory following (in this case D:\Foo. Popd returns back to the original directory.