Skip to content

Instantly share code, notes, and snippets.

@jef-n
Last active February 22, 2018 11:16
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
make-bat-for-py.bat
@echo off
echo.
echo. Generating .bat files for all .py files in %OSGEO4W_ROOT%\bin
echo.
pushd "%OSGEO4W_ROOT%\bin"
for %%g in (*.py) do (
if not exist %%~ng.bat (
echo @echo off >%%~ng.bat
echo call "%%OSGEO4W_ROOT%%\bin\o4w_env.bat" >>%%~ng.bat
echo python "%%OSGEO4W_ROOT%%\bin\%%g" %%* >>%%~ng.bat
)
)
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment