I'm trying to write a small VBscript program that read the word "226 Transfer Complete." on the FTPlog.txt file. if the program can't find the word "226 Transfer Complete." then it will rerun the batch file again until it find the "226 Transfer complete." line.
Dim FSO
Dim Found226
Dim objFile
Dim objRun
Dim strLine
Set FSO = CreateObject("Scripting.FileSystemObject"
Set objFile = FSO.OpenTextFile ("H:\Test\FTPWEBLOG.TXT"
Set Found266 = strLine
Do While objFile.AtEndOfStream <> true
strLine = objFile.ReadAll
strLine = "226 Transfer complete."
'Found226 = strLine
If Found226 = True then
objFile.close
End if
Loop
If Found226 = False Then
Set objRun = CreateObject("WScript.shell"
objRun.Run "H:\Test\gWdataXP.bat",1,true
Set ObjRun = Nothing
End if
objFile.close
Thankyou very much
Dim FSO
Dim Found226
Dim objFile
Dim objRun
Dim strLine
Set FSO = CreateObject("Scripting.FileSystemObject"
Set objFile = FSO.OpenTextFile ("H:\Test\FTPWEBLOG.TXT"
Set Found266 = strLine
Do While objFile.AtEndOfStream <> true
strLine = objFile.ReadAll
strLine = "226 Transfer complete."
'Found226 = strLine
If Found226 = True then
objFile.close
End if
Loop
If Found226 = False Then
Set objRun = CreateObject("WScript.shell"
objRun.Run "H:\Test\gWdataXP.bat",1,true
Set ObjRun = Nothing
End if
objFile.close
Thankyou very much