Skip to content

Instantly share code, notes, and snippets.

@der3k
Created February 3, 2013 07:25
Show Gist options
  • Select an option

  • Save der3k/4700836 to your computer and use it in GitHub Desktop.

Select an option

Save der3k/4700836 to your computer and use it in GitHub Desktop.
Capture script relative directory from windows batch. It also works when launched from different drive.
pushd %~dp0..
set LIB=%cd%\lib
popd
echo %LIB%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment