Supportnet / Forum / Anwendungen(Java,C++...)
Batchdatei erweitern ??
Frage
Hi
Ich hab hier eine Batchdatei, die zwei Files generiert.
Es sind zwei Dateien, die von meinem Router (Fli4l) gebraucht werden (opt.tgz und rc.cfrg) Inhalt der Batchdatei:
@echo off
if "%1" == "-?" goto usage
if "%1" == "-cls" set confdir=%2
if not "%1" == "-cls" set confdir=%1
if "%confdir%" == "" set confdir=config
windowsmkfli4l %confdir%
if errorlevel 1 goto end
cd opt
if exist ..imgopt.tgz del ..imgopt.tgz
if exist ..imgopt.tar del ..imgopt.tar
..windows ar -c -v -T opt.tmp -f ..imgopt.tar
..windowsgzip -9 ..imgopt.tar
copy etc
c.cfg ..img
c.cfg
move ..imgopt.tar.gz ..imgopt.tgz
del opt.tmp
cd ..
goto end
:usage
echo usage: mktgz [-cls] [config-directory]
:end
if "%1" == "-cls" cls
Wenn ich in der Konfiguration etwas geändert habe muss ich diese beiden Dateien dann noch ins Verzeichnis /boot des Routers kopieren.
(entsprechende Shares sind auf dem Router vorhanden)
Ich hatte eine Batchdatei erstellt, welches dieses Kopieren mit einem Klick erledigt
Nun meine Frage:
Kann ich die obige Batchdatei um den Kopierbefehl erweitern ??
Wenn ja wie müsste das dann aussehen ??
Ouellpfade:
c:
outerfli4l-2.0.7imgopt.tgz
c:
outerfli4l-2.0.7img
c.cfg
Zielpfad:
\FLI4L
ootoot
Mfg Micha
Antwort 1 von Strauss
Hi
Wieder die Pfadangaben hinüber !
Orginal Batchdatei :
Quellpfad:
Zielpfad:
Mfg Micha
Wieder die Pfadangaben hinüber !
Orginal Batchdatei :
Zitat:
@echo off
if "%1" == "-?" goto usage
if "%1" == "-cls" set confdir=%2
if not "%1" == "-cls" set confdir=%1
if "%confdir%" == "" set confdir=config
windowsmkfli4l %confdir%
if errorlevel 1 goto end
cd opt
if exist ..imgopt.tgz del ..imgopt.tgz
if exist ..imgopt.tar del ..imgopt.tar
..windows ar -c -v -T opt.tmp -f ..imgopt.tar
..windowsgzip -9 ..imgopt.tar
copy etc
c.cfg ..img
c.cfg
move ..imgopt.tar.gz ..imgopt.tgz
del opt.tmp
cd ..
goto end
:usage
echo usage: mktgz [-cls] [config-directory]
:end
if "%1" == "-cls" cls
Quellpfad:
Zitat:
c:
outerfli4l-2.0.7imgopt.tgz
c:
outerfli4l-2.0.7img
c.cfg
Zielpfad:
Zitat:
\FLI4L
ootoot
Mfg Micha
Antwort 2 von Strauss
Hi
So ein Sch......
In der Vorschau war alles noch in Ordnung:
Jetzt mal ohne Zitatformatierung:
Batchdatei:
Quellpfade:
Zielpfad:
Mfg Micha
So ein Sch......
In der Vorschau war alles noch in Ordnung:
Jetzt mal ohne Zitatformatierung:
Batchdatei:
@echo off
if "%1" == "-?" goto usage
if "%1" == "-cls" set confdir=%2
if not "%1" == "-cls" set confdir=%1
if "%confdir%" == "" set confdir=config
windowsmkfli4l %confdir%
if errorlevel 1 goto end
cd opt
if exist ..imgopt.tgz del ..imgopt.tgz
if exist ..imgopt.tar del ..imgopt.tar
..windows ar -c -v -T opt.tmp -f ..imgopt.tar
..windowsgzip -9 ..imgopt.tar
copy etc
c.cfg ..img
c.cfg
move ..imgopt.tar.gz ..imgopt.tgz
del opt.tmp
cd ..
goto end
:usage
echo usage: mktgz [-cls] [config-directory]
:end
if "%1" == "-cls" cls
Quellpfade:
c:
outerfli4l-2.0.7img
c.cfg
c:
outerfli4l-2.0.7imgopt.tgz
Zielpfad:
\FLI4L
ootoot
Mfg Micha