Advertisement
Mauzen

SA-MP version switcher V1

Jan 19th, 2014
906
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @ECHO OFF
  2.  
  3. REM Really simple samp version switcher
  4. REM Realized purely in a batch script
  5. REM Mauzen, 1/19/2014
  6.  
  7. ECHO *************************************
  8. ECHO *  SA-MP Batch Version Switcher V1  *
  9. ECHO *   Created by Mauzen, 1/19/2014    *
  10. ECHO *************************************
  11. ECHO.
  12.  
  13. REM *** Store the current working directory ***
  14. SET CURDIR=%~dp0
  15.  
  16. IF "%1"=="" (
  17.     REM *** Get the current version ***
  18.     ECHO The currently active version is:
  19.     TYPE curversion.cfg
  20.     ECHO.
  21.     ECHO Available versions:
  22.     DIR /B /A:D
  23.     PAUSE
  24.     GOTO:EOF
  25. )
  26.  
  27.  
  28. REM *** Check if selected version is installed ***
  29. IF exist "%1" (
  30.     ECHO Switching to version "%1"
  31. ) ELSE (
  32.     ECHO Version "%1" is not available.
  33.     PAUSE
  34.     GOTO:EOF
  35. )
  36.  
  37. REM *** Move version files to game directory ***
  38. XCOPY /E /Y %1\* ..
  39. ECHO.
  40. ECHO Successfully switched to version %1
  41.  
  42. REM *** Save active version to file for later use ***
  43. ECHO %1 > curversion.cfg
  44.  
  45. PAUSE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement