Last active
February 22, 2018 11:16
-
-
Save jef-n/a4c658f0287f8cedd4e9ab7064b8d956 to your computer and use it in GitHub Desktop.
make-bat-for-py.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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