Advertisement
Guest User

Untitled

a guest
Apr 8th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. SET VPPATH=C:\Visual Pinball
  3. SET POVS=
  4. SET VBSS=
  5.  
  6. if [%1] == [] (SET /P FOLDER=Enter Folder Name: ) ELSE (SET FOLDER=%1%)
  7.  
  8. CHOICE /T 5 /D Y /M "Extract POV Files? "
  9. IF "%ERRORLEVEL%"=="1" (SET POVS=y)
  10.  
  11. CHOICE /T 5 /D Y /M "Extract VBS Files? "
  12. IF "%ERRORLEVEL%"=="1" (SET VBSS=y)
  13.  
  14. if /I "%POVS%"=="" (if /I "%VBSS%"=="" (Echo Nothing Selected to Extract & goto END))
  15.  
  16. for /f "tokens=* delims=" %%f in ('dir "%FOLDER%"\*.vpx /s /b') do (
  17.     ECHO Processing %%f
  18.     if /I "%POVS%"=="y" (
  19.         if exist "%%~df%%~pf%%~nf.pov" (
  20.           ECHO   Skipping POV as %%~nf.pov already exists
  21.         ) ELSE (
  22.           ECHO   Extracting POV from "%%f"
  23.           start "VPX" /D "%VPPATH%" /min /wait VPinballX.exe -pov "%%f"
  24.         )
  25.     )
  26.  
  27.     if /I "%VBSS%"=="y" (
  28.         if exist "%%~df%%~pf%%~nf.vbs" (
  29.           ECHO   Skipping VBS as %%~nf.vbs already exists
  30.         ) ELSE (
  31.           ECHO   Extracting VBS from "%%f"
  32.           start "VPX" /D "%VPPATH%" /min /wait VPinballX.exe -extractvbs "%%f"
  33.         )
  34.     )
  35. )
  36.  
  37. :END
  38. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement