You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
650 B

  1. @echo off
  2. for %%d in (%~dp0..\) do set Directory=%%~fd
  3. for %%d in (%~dp0..\..) do set ParentDirectory=%%~fd
  4. echo %Directory%
  5. echo %ParentDirectory%
  6. pause
  7. for /f "usebackq tokens=*" %%a in (`dir /A:D /B %Directory% ^| findstr /r /i w.*py.*`) do (
  8. set _winpython=%%a
  9. goto skipB
  10. )
  11. :skipB
  12. set winpython="%Directory%\%_winpython%"
  13. for /f "usebackq tokens=*" %%a in (`dir /A:D /B %winpython% ^| findstr /r /i python.*`) do (
  14. set exe=%%a
  15. goto skipC
  16. )
  17. :skipC
  18. REM set exe="%winpython%\%exe%\python.exe"
  19. "%winpython%\t\7z.exe" a -t7z "%ParentDirectory%\python.7z" -p123456789 -mhe=on -mx "%Directory%" -xr!%_winpython% -xr!__pycache__
  20. python upload.py