Is there any command / tool to navigate previous directory in windows command prompt?
In linux usually use
cd -
for previous directory navigation.
|
Is there any command / tool to navigate previous directory in windows command prompt? In linux usually use
for previous directory navigation. |
|||
|
|
|
Save the following to eg.
Then always remember to use Alternatively, use a
The only caveat is if you omit the space between |
|||||||||||||
|
|
You can use pushd and popd: C:\WINDOWS>pushd \ C:\>popd C:\WINDOWS> |
||||
|
If you want the exact behavior of bash, why not use bash? I have cygwin installed and it is very nice. It doesn't make you stick to its UNIX tools - it will happily call any windows executable. For
|
|||
|
|
|
There's a freeware
|
|||||||||
|
|
if you are running the batch file you can use
This will jump back to the original path from where the batch file was run |
|||
|
|
|
You could do this using Windows Powershell http://en.wikipedia.org/wiki/Windows_PowerShell Here's how: http://windows-powershell-scripts.blogspot.com/2009/07/cd-change-to-previous-working-directory.html |
|||
|
|
|
Perhaps this is what you are looking for. If you have:
and you want to go back to C:\, just type:
Result:
|
||||
|
|
|
Depending what your goal is, you could just start a new cmd session by doing 'cmd', move directory and do whatever you want, when you then do 'exit' to leave the session you'll be back in the directory you were when you started the new session. |
|||
|
|