8
0
Skriptentwickung/test/test2 (2).vbs
2024-01-24 16:42:38 +01:00

24 lines
617 B
Plaintext

set objTextFile2 = fs.OpenTextFile("\\ntlifeprotest\workarea\cdpsxh\cmelog.txt",2,True)
Set wshshell = WScript.CreateObject("wscript.Shell")
retcode = Wshshell.run ("cmd /c ftp -s:cmeftp.scr "&strServer&" > objTextFile2",2,True)
'wscript.echo ("retcode = "&retcode)
objTextFile2.Close
'WScript.Sleep(100000) ' 10 second delay
Set objTextFile3 = fs.OpenTextFile("objTextFile2", 1)
Do Until objTextFile3.AtEndOfStream
strLine = objTextFile3.Readline
If InStr(strLine, "Transfer complete") <> 0 Then
wscript.echo strLine
wscript.echo "found"
else
wscript.echo strLine
wscript.echo "not found"
End If
Loop