Skip to content

Instantly share code, notes, and snippets.

@elmotec
Last active August 29, 2015 14:12
Show Gist options
  • Save elmotec/b639027d073d6dfe84a7 to your computer and use it in GitHub Desktop.
Save elmotec/b639027d073d6dfe84a7 to your computer and use it in GitHub Desktop.
Basic wrapper around uniquepath.py that allow changing PATH in one command
@echo off
set PYTHON=python.exe
for %%a in (%*) do (
if "%%a" == "-h" goto nocall
if "%%a" == "--help" goto nocall
if "%%a" == "-d" goto nocall
if "%%a" == "--debug" goto nocall
)
%PYTHON% %~dp0uniquepath.py %* > %TMP%\uniquepath_helper.bat
call %TMP%\uniquepath_helper.bat
goto end
:nocall
%PYTHON% %~dp0uniquepath.py %*
:end
exit /B %ERRORLEVEL%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment