Advertisement
dziban303

WoWS Mod folder backup batch file

Oct 13th, 2017
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.38 KB | None | 0 0
  1.      @ECHO OFF
  2.     REM A batch file for saving backups of the mod folders.
  3.      REM Version 1.0, 13 October 2017, by dziban303 of https://worldofwarshipsskins.reddit.com
  4.      REM This assumes you have 7Zip installed at it's default directory of C:\Program Files\7Zip.
  5.      REM If you have it installed elsewhere, you must change the path on those two lines.
  6.      if "%1"=="" goto :fail
  7.      if not exist "%1" goto :wrong
  8.      if "%2"=="f" goto :full
  9.      if "%2"=="-f" goto :full
  10.      echo You have chosen a partial backup with no DDS textures or PSD files. Use switch "f" for a full backup.
  11.      set filename="%1 (no dds or psd).7z"
  12.      "C:\Program Files\7-Zip\7z" a %filename% .\%1\* -xr!*.dds -xr!*.psd -mx=9
  13.      if errorlevel 1 echo Looks like something went wrong. && goto :eof
  14.      echo Done!
  15.      goto :eof
  16.      :full
  17.      echo You have chosen a full backup.
  18.      set filename="%1 (full).7z"
  19.      "C:\Program Files\7-Zip\7z" a %filename% .\%1\* -mx=9
  20.      if errorlevel 1 echo Looks like something went wrong. && goto :eof
  21.      echo Done!
  22.      goto :eof
  23.      :fail
  24.      echo Oops, you didn't enter any arguments.
  25.      echo Usage: backupmods (mod folder) (f)
  26.      echo Example: backupmods 0.6.9.1.1   -- Partial backup
  27.      echo Example 2: backupmods 0.6.9.1.1 f   -- Full backup
  28.      echo Try again.
  29.      goto :eof
  30.      :wrong
  31.      echo That folder (%1) doesn't exist.
  32.      goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement