dax4fun
Goto Top

Ftp per Batch statt einer Datei werden alle kopiert?

Hi, Leute

Bitte um Hilfe : Die Datei die kopiert werden soll heist CAS01_555555.bat (exe), die Variable %Computername% wird ordentlich aufgelöst
wenn sich am \\ftp-Server\Update eine Datei Bsp. CAS02_555555.bat befindet wird die auch kopiert ????

Wieso ????

rem #############creating ftp script#####

echo open SERVER>ftp.txt
echo user>>ftp.txt
echo pass>>ftp.txt
echo lcd D:\>>ftp.txt
echo cd update>>ftp.txt
echo ascii>>ftp.txt
echo mget -y %COMPUTERNAME%.bat>>ftp.txt
echo binary>>ftp.txt>>ftp.txt
echo mget -y %COMPUTERNAME%.exe>>ftp.txt
echo rename %COMPUTERNAME%.exe %COMPUTERNAME%.OK>>ftp.txt
echo disconnect>>ftp.txt
echo bye>>ftp.txt

Content-Key: 228576

Url: https://administrator.de/contentid/228576

Printed on: April 26, 2024 at 10:04 o'clock

Member: Xaero1982
Solution Xaero1982 Feb 03, 2014 updated at 22:09:26 (UTC)
Goto Top
Moin,

meine Meinung: %Computername% wird nicht aufgelöst, weil "Ftp" das nicht kennt - bei mir kommt zumindest "ungültiger Befehl".

Mget hat keinen Parameter "-y".
Du willst nur eine Datei kopieren? Dann wäre get dein Freund.

Gruß
Member: dax4fun
dax4fun Feb 03, 2014 at 22:09:22 (UTC)
Goto Top
ftp --help (letzte Zeile) zumindest unter xp steht mget und mput akzeptieren y/n/q für yes no quit

mach mir ein ftp script.bat:
echo %Computername%.exe>>ftp script.txt

ftp script.txt:
Xaero1982pc.exe

face-smile

mit get funktioniert es danke

kann mich erinnern das habe ich vor Jahren gesucht ganze Ordner per ftp zu kopieren und jetzt komm ich unerwünscht drauf
man man was ist das für eine ungerechte Welt face-smile
Member: Xaero1982
Xaero1982 Feb 05, 2014 at 08:44:07 (UTC)
Goto Top
Unter windows 7 find ich das nicht und selbst bei google irgendwie nicht face-smile

Pfiffige Idee mit dem Computernamen - das stimmt face-smile

Gerne.

Gruß