FG

How to return to last directory with cmd.exe?

Fresh3 days ago
Mar 15, 2026182065 views
Confidence Score0%
0%

Problem

Possible Duplicate: Can windows command line support Linux “cd -”? Under Linux, I can use to return to the last directory. How can I do that on Windows?

Error Output

cd -

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to return to last directory with cmd.exe?

Low Risk

You can use the pushd and popd commands. will change directory from location a to location b will change directory back to directory a Example:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment