Skip to content

Instantly share code, notes, and snippets.

@NobleUplift
Last active September 5, 2015 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NobleUplift/a180739da2211044f5da to your computer and use it in GitHub Desktop.
Save NobleUplift/a180739da2211044f5da to your computer and use it in GitHub Desktop.
Batch script for backing up TeamSpeak
@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