Skip to content

Instantly share code, notes, and snippets.

@joebuschmann
Created December 11, 2014 21:12
Show Gist options
  • Select an option

  • Save joebuschmann/fcda55d724e9a3c5b985 to your computer and use it in GitHub Desktop.

Select an option

Save joebuschmann/fcda55d724e9a3c5b985 to your computer and use it in GitHub Desktop.
@echo off
:: Save the current directory to the directory stack and
:: change the current directory to the one in which the current batch file is located.
pushd %~dp0
echo %CD%
:: Restore the previous current directory.
popd
echo %CD%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment