24 lines
617 B
Plaintext
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
|