forked from MaikEight/ExaltAccountManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EAM_BackupTool.bat
61 lines (55 loc) · 1.19 KB
/
EAM_BackupTool.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@echo off
echo Exalt Account Manager Backup Tool by Maik8
echo:
echo Disclaimer: NO WARRANTYS OR COVER FOR LOST DATA!
echo:
echo:
:SelectMode
echo Select mode:
echo 1: Create a backup
echo 2: Rollback to current backup
echo Select mode by typing 1 or 2 and press enter.
set /P mode=""
if %mode% equ 1 (
goto CreateBackup
) else if %mode% equ 2 (
goto Rollback
) else (
cls
echo #######################
echo # Wrong input format! #
echo #######################
echo:
goto SelectMode
)
:CreateBackup
if exist .\EAMBackup\ (
rmdir /s/q .\EAMBackup
echo Deleted old backup.
)
echo Starting the backup process...
xcopy "C:\Users\%username%\AppData\Local\ExaltAccountManager" ".\EAMBackup" /S /E /C /Y /I > Nul
echo:
echo Backup DONE!
echo:
pause
exit
:Rollback
if exist .\EAMBackup\ (
if exist C:\Users\%username%\AppData\Local\ExaltAccountManager\ (
rmdir /s/q C:\Users\%username%\AppData\Local\ExaltAccountManager
echo Deleted old files
)
echo Starting the rollback...
xcopy ".\EAMBackup" "C:\Users\%username%\AppData\Local\ExaltAccountManager" /S /E /C /Y /I > Nul
echo Rollback DONE!
pause
exit
) else (
echo:
echo No backup found!
echo Aborting without changes!
echo:
pause
exit
)