@ECHO OFF
set DIRECT=%~dp0
REM Find DOS name
SET TMP_DIR=""
for /d %%I in ("%DIRECT%") do (
  if %TMP_DIR% == "" (
    SET TMP_DIR=%%~sI
  ) else (
    SET TMP_DIR=%TMP_DIR%%%~sI
  )
)
SET DIRECT=%TMP_DIR%
REM Remove last "\"
if "%DIRECT:~-1%" == "\" (
  SET DIRECT=%DIRECT:~0,-1%
)
SET PYTHONPATH=%DIRECT%\Python27
SET PYTHONHOME=%DIRECT%\Python27
SET PATH=%PYTHONPATH%;%PATH%
%PYTHONPATH%\python.exe "%DIRECT%\extractor.py" %1 %2
