-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKSP_Move.bat
148 lines (123 loc) · 2.44 KB
/
KSP_Move.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
REM Move KSP Configs by a File List
REM @echo OFF
:FileListSet
CLS
set /p FileList=Enter desired 'File.Lst' to process:
if %1 ==1
(
set /p FileList=Provide new 'File.Lst' or Enter:
)
if exist "%FileList%"
(
echo File "%FileList%" found.
echo List to process locked to "%FileList%"
goto :Prompt
)
else
(
echo File "%FileList%" not found. Exiting.
timeout 3
exit 2
)
:SourceSet
CLS
set "Source=C:\Games\Kerbal Space Program\KSPwin64-1.9.1"
echo Source Folder currently set to "%Source%"
if %1 ==2
(
set /p Source=Provide new Source Folder or Enter:
)
if exist "%Source%"
(
echo Source Folder "%Source%" found.
timeout 3
goto TargetSet
)
else
(
echo Source Folder "%Source%" not found. Exiting.
timeout 3
exit 2
)
pause
:TargetSet
CLS
set "Target=C:\Games\Kerbal Space Program\KSPwin64-1.9.1 [DnD]\RemovedFiles\%FileList:~0,-4%"
echo Target Folder currently set to "%Target%"
if %1 ==3
(
set /p Target=Provide new Target Folder or Enter:
)
if exist "%Target%"
(
echo Target Folder "%Source%" found.
timeout 3
goto Bye
)
else
(
md "%target%"
)
echo Target Folder set to "%target%"
pause
:Process
FOR /F "delims=" %%a in ('type "%FileList%"') do move "%source%\%%a" "%target%"
echo File move complete.
timeout 5
goto Bye
:LastDance
echo List to process locked to "%FileList%"
echo Press 1 to change
echo
echo Source Folder locked to "%Source%"
echo Press 2 to change
echo
echo Target Folder locked to "%Target%"
echo Press 3 to change
echo
echo
choice /N /C:1234 /M "Pick a number (1, 2, 3, or 4)" %1
if ERRORLEVEL ==4
(
)
if ERRORLEVEL ==3
(
echo Changing FileList ...
timeout 3
goto FileListSet
)
else if ERRORLEVEL ==2 goto SourceSet
(
echo Changing Source Foler ...
timeout 3
goto SourceSet
)
else if ERRORLEVEL ==1 goto FileListSet
(
echo Changing Target Folder ...
timeout 3
goto TargetSet
)
:Prompt
if exist "%SystemRoot%\System32\choice.exe" goto UseChoice
setlocal EnableExtensions EnableDelayedExpansion
:UseSetPrompt
set "UserChoice=N"
set /P "UserChoice=Are you sure [Y/N]?"
set "UserChoice=!UserChoice: =!"
if /I "!UserChoice!" == "N" endlocal & goto :EOF
if /I not "!UserChoice!" == "Y" goto UseSetPrompt
endlocal
goto Continue
:UseChoice
REM | CHOICE /T:N,10 >NUL
REM %SystemRoot%\System32\choice.exe /T 8 /C YN /D Y /M "Are you sure [Y/N]?"
if errorlevel 2 goto Bye
:Continue
echo So, you think you're ready? Okay, let's go ...
goto STset
:Bye
CLS
echo Process complete.
echo Press any key to close this window.
pause > nul