Last active
September 5, 2015 19:35
-
-
Save NobleUplift/a180739da2211044f5da to your computer and use it in GitHub Desktop.
Batch script for backing up TeamSpeak
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
REM Created on 2014 April 4th at 07:38 PM. | |
SET WD=%CD% | |
IF [%1]==[] ( | |
SET EXE=ts3client_win64.exe | |
) ELSE ( | |
SET EXE=%1 | |
) | |
IF [%2]==[] ( | |
SET BACKUPDIR=%USERPROFILE%\Backups\TeamSpeak | |
) ELSE ( | |
SET BACKUPDIR=%1 | |
) | |
TASKKILL /IM %EXE% | |
ECHO Waiting for program to close... | |
PING 1.2.3.4 -n 1 -w 5000 >NUL | |
FOR /F "tokens=* delims=" %%A IN ('DATE/T') DO SET DATE=%%A | |
SET DATE=%DATE:~0,10% | |
"C:\Program Files\7-Zip\7z.exe" a -tzip "%BACKUPDIR%\TS3Client_%DATE%.zip" "%APPDATA%\TS3Client" | |
ATTRIB +R "%BACKUPDIR%\TS3Client_%DATE%.zip" | |
"C:\Program Files\TeamSpeak 3 Client\%EXE%" | |
CD %WD% | |
EXIT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment