-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbat-dir2arc_lmod.html
303 lines (289 loc) · 18 KB
/
bat-dir2arc_lmod.html
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Windows (vers 25 January 2008), see www.w3.org">
<title>
Titel
</title>
<meta name="author" content="Dr. Stephan Frye">
<meta name="description" content="">
<meta name="generator" content="HTML Studio">
<link type="text/css" rel="stylesheet" href="stil-grau.css">
<link rel="SHORTCUT ICON" href="favicon.ico">
</head>
<body>
<pre>
<font color="#FF0033">@echo</font> <font color="#FF0033">off</font>
Title dir2arc-lmod - Batch-Skript
rem *********************************************************
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> dir2arc - Unterverzeichnisse in einzelne Archive verpacken
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> Stephan Frye - <font color="#0000FF" style="font-weight:
bold;">17.09.2005</font> Version <font color="#0000FF" style="font-weight:
bold;">0.01</font> alpha
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> <font color="#0000FF" style="font-weight:
bold;">25.09.2005</font> Version <font color="#0000FF" style="font-weight:
bold;">0.02</font> alpha
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> <font color="#0000FF" style="font-weight:
bold;">14.10.2005</font> Version <font color="#0000FF" style="font-weight:
bold;">0.03</font> alpha
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> <font color="#0000FF" style="font-weight:
bold;">24.03.2007</font> Version <font color="#0000FF" style="font-weight:
bold;">0.06</font> alpha
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> <font color="#0000FF" style="font-weight:
bold;">01.04.2007</font> Version <font color="#0000FF" style="font-weight:
bold;">0.07</font> alpha
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> <font color="#0000FF" style="font-weight:
bold;">05.04.2007</font> Version <font color="#0000FF" style="font-weight:
bold;">0.08</font> alpha
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight:
bold;">:</font> Verwendung der subst Routine im Versuch Problemen mit "out of memory" von lmod zu umgehen
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> "PRB<font color="#FF0000" style="font-weight:
bold;">:</font> Executing a <font color="#0000FF" style="font-weight:
bold;">16-Bit</font> Process with a Large Command Line on Windows NT/<font color=
"#0000FF" style="font-weight: bold;">2000</font>/XP" (http<font color="#FF0000" style=
"font-weight: bold;">:</font>//support.microsoft.com/kb/<font color="#0000FF" style=
"font-weight: bold;">198429</font>/en-us)
rem *********************************************************
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> Setzen der Variablen und der Verzeichnisse
<font color="#FF0033">set</font> arjdir=d<font color="#FF0000" style="font-weight:
bold;">:</font>\data\dienst\arj
<font color="#FF0033">set</font> tempdir=%tmp%\dir2arc
<font color="#FF0033">set</font> mboxweg="D<font color="#FF0000" style="font-weight:
bold;">:</font>\data\Dienst\bin\msgbox.exe"
if exist %rdtmp% <font color="#FF0033">set</font> tempdir=%rdtmp%\dir2arc
<font color="#FF0033">set</font> arbdir=d<font color="#FF0000" style="font-weight:
bold;">:</font>\data\dienst\dir2arc
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> Arbeitsverzeichnis erstellen
if not exist %tempdir% md %tempdir%
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> auf vorhandene Eingabe testen
if "%<font color="#0000FF" style="font-weight: bold;">1</font>%"=="" goto eingabe_fehlt
if not exist "%<font color="#0000FF" style="font-weight:
bold;">1</font>%" goto eingabe_fehlt
<font color="#FF0033">echo</font> Ausgew„hltes Verzeichnis<font color="#FF0000"
style="font-weight: bold;">:</font> %<font color="#0000FF" style="font-weight:
bold;">1</font>
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> Unterverzeichnise auflisten
<font color="#FF0033">echo</font> ------------------------------
<font color="#FF0033">echo</font> Vorhandene Unterverzeichnisse<font color="#FF0000"
style="font-weight: bold;">:</font>
dir /ad /b /o<font color="#FF0000" style="font-weight: bold;">:</font>d %<font color=
"#0000FF" style="font-weight: bold;">1\</font>*.*
dir /ad /b /o<font color="#FF0000" style="font-weight: bold;">:</font>d %<font color=
"#0000FF" style="font-weight: bold;">1\</font>*.* >%tempdir%\dirlist.txt
<font color="#FF0033">echo</font> ------------------------------
<font color="#FF0033">echo</font> Letzte Möglichkeit abzubrechen!
%mboxweg% @%tempdir%\dirlist.txt "Liste der Unterverzeichnisse in %<font color="#0000FF"
style="font-weight: bold;">1</font><font color="#FF0000" style="font-weight:
bold;">:</font>" <font color="#0000FF" style="font-weight: bold;">3</font> <font color=
"#0000FF" style="font-weight: bold;">2</font>
if %errorlevel% == <font color="#0000FF" style="font-weight: bold;">2</font> goto abbruch
if %errorlevel% == <font color="#0000FF" style="font-weight:
bold;">1</font> goto nach_liste
<font color="#FF0000" style="font-weight: bold;">:</font>nach_liste
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> mögliche alte Batch-Datei löschen
if exist %tempdir%\d2a.bat <font color=
"#FF0033">echo</font> Alte d2a.bat gefunden, wird gelöscht!
if exist %tempdir%\d2a.bat del /q %tempdir%\d2a.bat
<font color="#FF0000" style="font-weight: bold;">:</font>pwfrage
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> Passwort setzen, wenn erwünscht
<font color="#FF0033">set</font> passwort=
%mboxweg% "Soll ein Passwort gesetzt werden?" "Password" <font color="#0000FF" style=
"font-weight: bold;">3</font> <font color="#0000FF" style="font-weight: bold;">3</font>
if %errorlevel% == <font color="#0000FF" style="font-weight:
bold;">7</font> goto nach-pwfrage
if %errorlevel% == <font color="#0000FF" style="font-weight: bold;">6</font> <font color=
"#FF0033">set</font> passwort=passwort
%mboxweg% "Das Passwort wurde auf '%passwort%' gesetzt!" "Passwort" <font color="#0000FF"
style="font-weight: bold;">1</font> <font color="#0000FF" style="font-weight:
bold;">1</font>
<font color="#FF0000" style="font-weight: bold;">:</font>nach-pwfrage
<font color="#FF0000" style="font-weight: bold;">:</font>verz_loe_frage
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight:
bold;">:</font> Abfrage, ob Unterverzeichnisse nach der Kompression gelöscht werden sollen
%mboxweg% "Sollen die Unterverzeichnisse nach dem Packen gelöscht werden?" "Unterverzeichnisse löschen?" <font color="#0000FF"
style="font-weight: bold;">3</font> <font color="#0000FF" style="font-weight:
bold;">3</font>
if %errorlevel% == <font color="#0000FF" style="font-weight: bold;">7</font> <font color=
"#FF0033">set</font> loeschen=<font color="#0000FF" style="font-weight: bold;">0</font>
if %errorlevel% == <font color="#0000FF" style="font-weight: bold;">7</font> goto archiv
if %errorlevel% == <font color="#0000FF" style="font-weight:
bold;">6</font> %mboxweg% "Sind Sie sicher? Wirklich löschen?" "Achtung!" <font color="#0000FF"
style="font-weight: bold;">2</font> <font color="#0000FF" style="font-weight:
bold;">3</font>
if %errorlevel% == <font color="#0000FF" style="font-weight: bold;">7</font> <font color=
"#FF0033">set</font> loeschen=<font color="#0000FF" style="font-weight: bold;">0</font>
if %errorlevel% == <font color="#0000FF" style="font-weight: bold;">7</font> goto archiv
if %errorlevel% == <font color="#0000FF" style="font-weight: bold;">6</font> <font color=
"#FF0033">set</font> loeschen=<font color="#0000FF" style="font-weight: bold;">1</font>
%mboxweg% "Es werden somit nur die gepackten Verzeichnisse gelöscht." "Info" <font color="#0000FF"
style="font-weight: bold;">1</font> <font color="#0000FF" style="font-weight:
bold;">1</font>
<font color="#FF0000" style="font-weight: bold;">:</font>archiv
<font color="#FF0033">echo</font> Verzeichis als Laufwerk definieren.
<font color="#FF0033">set</font> vir-drive=u<font color="#FF0000" style="font-weight:
bold;">:</font>
if exist %vir-drive% <font color="#FF0033">set</font> vir-drive=x<font color="#FF0000"
style="font-weight: bold;">:</font>
if exist %vir-drive% <font color="#FF0033">set</font> vir-drive=y<font color="#FF0000"
style="font-weight: bold;">:</font>
if exist %vir-drive% <font color="#FF0033">set</font> vir-drive=z<font color="#FF0000"
style="font-weight: bold;">:</font>
if exist %vir-drive% goto vir-drive-fehler
if not exist %vir-drive% subst %vir-drive% /d
<font color="#FF0033">echo</font> Virtuelles Laufwerk<font color="#FF0000" style=
"font-weight: bold;">:</font> %vir-drive%
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font><font color="#FF0033">pause</font>
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font>subst %vir-drive% %<font color="#0000FF" style="font-weight:
bold;">1</font>%
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font>> %tempdir%\d2a.bat <font color=
"#FF0033">echo</font> subst %vir-drive% /d
> %tempdir%\d2a.bat <font color="#FF0033">echo</font> subst %vir-drive% %<font color=
"#0000FF" style="font-weight: bold;">1</font>%
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font><font color="#FF0033">echo</font> <font color=
"#FF0033">pause</font> >> %tempdir%\d2a.bat
<font color="#FF0033">echo</font> LMOD für Archiverstellung aufrufen.
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight:
bold;">:</font> Die Textdatei mit der Liste der Unterverzeichnisse wird and LMOD übergeben
if "%passwort%"=="" goto arc-ohne-pw
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> DPP-Archiv
< %tempdir%\dirlist.txt %arbdir%\LMOD.COM /L* %arjdir%\arj32.exe a -hf4 -i6 -jm -r -a1 -g%passwort% "%vir-drive%\[].dpp" "%vir-drive%\[]\*.*">> %tempdir%\d2a.bat
goto LMOD-Errorlevel
<font color="#FF0000" style="font-weight: bold;">:</font>arc-ohne-pw
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> ARJ-Archiv
< %tempdir%\dirlist.txt %arbdir%\LMOD.COM /L* %arjdir%\arj32.exe a -hf4 -i6 -jm -r -a1 "%vir-drive%\[].arj" "%vir-drive%\[]\*.*">> %tempdir%\d2a.bat
<font color="#FF0000" style="font-weight: bold;">:</font>LMOD-Errorlevel
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> LMOD Errorlevel <font color="#0000FF" style="font-weight:
bold;">0</font><font color="#FF0000" style="font-weight:
bold;">:</font> ok, <font color="#0000FF" style="font-weight: bold;">1</font><font color=
"#FF0000" style="font-weight: bold;">:</font> invalid token/expression, <font color=
"#0000FF" style="font-weight: bold;">2</font><font color="#FF0000" style="font-weight:
bold;">:</font> invalid options
if %errorlevel% == <font color="#0000FF" style="font-weight:
bold;">0</font> goto nach_lmod_arc
if %errorlevel% == <font color="#0000FF" style="font-weight:
bold;">2</font> %mboxweg% "invalid options" "LMOD Fehler!" <font color="#0000FF" style=
"font-weight: bold;">2</font> <font color="#0000FF" style="font-weight: bold;">1</font>
if %errorlevel% == <font color="#0000FF" style="font-weight:
bold;">1</font> %mboxweg% "invalid token/expression" "LMOD Fehler!" <font color="#0000FF"
style="font-weight: bold;">2</font> <font color="#0000FF" style="font-weight:
bold;">1</font>
goto abbruch
<font color="#FF0000" style="font-weight: bold;">:</font>nach_lmod_arc
<font color="#FF0033">echo</font> LMOD für Archiverstellung ist fertig.
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> Erzeugte Batchdatei aufrufen.
<font color="#FF0033">call</font> %tempdir%\d2a.bat
<font color="#FF0033">echo</font> ------------------------------------
<font color="#FF0033">echo</font> Die d2a.bat wurde soeben aufgerufen!
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight:
bold;">:</font> Batch-Datei für das Löschen der gepackten Verzeichnisse erstellen
if %loeschen% == <font color="#0000FF" style="font-weight:
bold;">1</font> goto verz_loeschen
goto temp_loeschen
<font color="#FF0000" style="font-weight: bold;">:</font>verz_loeschen
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight:
bold;">:</font> Die Textdatei mit der Liste der Unterverzeichnisse wird an LMOD übergeben
if "%passwort%"=="" goto wenn-arj-loe
<font color="#FF0000" style="font-weight: bold;">:</font>wenn-dpp-loe
< %tempdir%\dirlist.txt %arbdir%\LMOD.COM /L* if exist "%vir-drive%\[].dpp" rmdir /q /s "%vir-drive%\[]"> %tempdir%\verzloe.bat
goto <font color="#FF0033">start</font>-del-bat
<font color="#FF0000" style="font-weight: bold;">:</font>wenn-arj-loe
< %tempdir%\dirlist.txt %arbdir%\LMOD.COM /L* if exist "%vir-drive%\[].arj" rmdir /q /s "%vir-drive%\[]"> %tempdir%\verzloe.bat
<font color="#FF0000" style="font-weight: bold;">:</font><font color=
"#FF0033">start</font>-del-bat
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> Erzeugte Batchdatei aufrufen.
<font color="#FF0033">call</font> %tempdir%\verzloe.bat
rem del /q %tempdir%\verzloe.bat
goto temp_loeschen
<font color="#FF0000" style="font-weight: bold;">:</font>temp_loeschen
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> Löschen des temporären Verzeichnisses
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font>rmdir /s /q %tempdir%
<font color="#FF0033">echo</font> ------------------
goto ende
<font color="#FF0000" style="font-weight: bold;">:</font>eingabe_fehlt
<font color="#FF0033">echo</font>.
<font color="#FF0033">echo</font> Eingabe fehlt!
<font color=
"#FF0033">echo</font> Das Programm DIR2ARC erwartet einen Verzeichnispfad als Eingabevariable!
<font color="#FF0033">echo</font> Abbruch!
%mboxweg% "Es wurde kein Verzeichnis angegeben!" "Abbruch!" <font color="#0000FF" style=
"font-weight: bold;">2</font> <font color="#0000FF" style="font-weight: bold;">1</font>
goto ende
<font color="#FF0000" style="font-weight: bold;">:</font>abbruch
<font color="#FF0033">echo</font>.
<font color="#FF0033">echo</font> Abbruch! Tschüß!
%mboxweg% "Der Vorgang wurde abgebrochen!" "Ende" <font color="#0000FF" style=
"font-weight: bold;">4</font> <font color="#0000FF" style="font-weight: bold;">1</font>
goto ende
<font color="#FF0000" style="font-weight: bold;">:</font>vir-drive-fehler
<font color="#FF0033">echo</font>.
<font color="#FF0033">echo</font> Abbruch!
<font color="#FF0033">echo</font> Die möglichen virtuellen Laufwerke (x<font color=
"#FF0000" style="font-weight: bold;">:</font> y<font color="#FF0000" style="font-weight:
bold;">:</font> z<font color="#FF0000" style="font-weight:
bold;">:</font>) sind alle in Gebrauch.
%mboxweg% "Die möglichen virtuellen Laufwerke (x<font color="#FF0000" style=
"font-weight: bold;">:</font> y<font color="#FF0000" style="font-weight:
bold;">:</font> z<font color="#FF0000" style="font-weight:
bold;">:</font>) sind alle in Gebrauch." "Abbruch!" <font color="#0000FF" style=
"font-weight: bold;">2</font> <font color="#0000FF" style="font-weight: bold;">1</font>
goto ende
<font color="#FF0000" style="font-weight: bold;">:</font>ende
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> Passwort löschen
<font color="#FF0033">set</font> passwort=
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> virtulles Laufwerk löschen
subst %vir-drive% /d
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font> Zurücketzen der anderen Variablen
<font color="#FF0033">set</font> tempdri=
<font color="#FF0033">set</font> arbdir=
<font color="#FF0033">set</font> mboxweg=
<font color="#FF0033">set</font> vir-drive=
<font color="#FF0033">echo</font> Fertig und Tschüß!
<font color="#FF0000" style="font-weight: bold;">:</font><font color="#FF0000" style=
"font-weight: bold;">:</font><font color="#FF0033">pause</font>
exit
</pre><!--INC:"heimatlink.inc"-->
<!-- ******************* Heimat Link *********************** -->
<hr size="6" width="99%" align="center">
<center>
<a href="heimat.ssi.shtml"><img src="bilder/homejump.gif" width="40" height="40"
alt="Heimat">
<br>
Home</a>
</center><!-- ******************* Heimat Link - Ende*********************** -->
<!--/INC:"heimatlink.inc"-->
</body>
</html>