-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMHWbackup.bat
72 lines (72 loc) · 1.78 KB
/
MHWbackup.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
62
63
64
65
66
67
68
69
70
71
72
@ECHO off
TITLE MHW Backup Script
SET SIF=C:\Program Files (x86)\Steam\userdata
::Checking if we have a saved Steam Insatall Filepath (SIF)
IF NOT EXIST SIF GOTO NATIVESIF
set /p SIF=<SIF
:NATIVESIF
ECHO %SIF%
:START
IF NOT EXIST "%SIF%" GOTO WhereYouInstallBruh
IF NOT EXIST SID GOTO genSID
set /p STEAMID=<SID
IF NOT EXIST "%SIF%\%STEAMID%\582010\remote" GOTO Error001
Time/t>tmptime.txt
Date/t>tmpdate.txt
timeout/t 2>nul
set /p datevar=<tmpdate.txt
set /p timevar=<tmptime.txt
set timevar=%timevar::=_%
set datevar=%datevar: =-%
set datevar=%datevar:/=_%
set storeDir="C:\Users\%USERNAME%\MHBACKUP\%datevar%%timevar%\"
xcopy /f /s /y "%SIF%\%STEAMID%\582010\remote" %storeDir%
TIMEOUT/t 5>nul
cls
ECHO[
ECHO END reached succesfully 10 seconds until auto termination
ECHO LOG: Succesfully backed up file on %DATE% at %TIME% saved in %storeDir%>lastlog.log
ECHO LOG: Succesfully backed up file on %DATE% at %TIME% saved in %storeDir%>>Persistentlog.log
TIMEOUT/t 10>nul
exit/b
:Error001
CLS
ECHO "ERROR: 1" MHW Savefile not found
ECHO Possibly wrong STEAMID
ECHO[
ECHO Please Delete "%CD%\SID" or manually modify your SID file to contain the correct ID
PAUSE
GOTO START
:genSID
copy /y NUL SID >NUL
cls
ECHO First time setup triggered
ECHO[
ECHO Please enter your SteamID
SET/P SID="SteamID="
set STEAMID=%SID%
IF NOT EXIST "%SIF%\%STEAMID%\582010\remote" GOTO Error001
ECHO %SID%>SID
GOTO START
:WhereYouInstallBruh
cls
ECHO %SIF%
ECHO Steam Installation not found
ECHO[
ECHO Please enter the path to your STEAM Folder
ECHO Example "C:\Program Files (x86)" NO \ at the end
SET/P SIF="Steam Install Folder="
IF NOT EXIST "%SIF%\Steam\userdata" GOTO SIFwrong
set SIF=%SIF%\Steam\userdata
ECHO %SIF%>SIF
GOTO START
:SIFwrong
cls
ECHO "%SIF%\Steam\userdata" not found.
TIMEOUT/t 10>nul
GOTO WhereYouInstallBruh