Skip to content

Instantly share code, notes, and snippets.

@dewe
Created July 1, 2014 05:53
Show Gist options
  • Save dewe/f5dd193acae0eb79af01 to your computer and use it in GitHub Desktop.
Save dewe/f5dd193acae0eb79af01 to your computer and use it in GitHub Desktop.
How to set workingdirectory and environment variables local to cmd script
@echo off
setlocal
pushd %~dp0
set APPDATA=%CD%\data
echo APPDATA=%APPDATA%
popd
endlocal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment