こんにちは、スクリプトの専門家....
以下のコードであなたの助けを探しています....RemoteServersList.Txtと私は\RemoteServerName\E$\V2\log.Txtのようなすべてのシステムを呼び出したかったのですが、数行のコードがありません...
親切に私を助けてください....どうもありがとう....
Set Fso = CreateObject("Scripting.FileSystemObject")
Set InFile = fso.OpenTextFile("RemoteServersList.Txt")
Const ForReading = 1
Do While Not (InFile.atEndOfStream)
strComputer = InFile.ReadLine
today = Date()
Set fso = CreateObject("Scripting.FileSystemObject")
strFilePath = "\\" & strComputer & "\E$\V2\" ' This is wrong 'here I am missing a 'code.. looking for your help
Set InputFile = fso.OpenTextFile("strFilePath\log.txt", 1) ' This is wrong here I am 'missing a code.. looking for your help
Set out = fso.OpenTextFile("error.log", 2)
Do Until InputFile.AtEndOfStream
line = InputFile.ReadLine
If Left(line, Len(today)+1) = "[" & today Then
WScript.Echo "Hello" ' I need to append this to output file
out.WriteLine line & vbTab & InputFile.ReadLine & vbTab & strComputer
If InStr(line, "error") > 0 Then
' line contains "error"
out.WriteLine line & vbTab & InputFile.ReadLine & vbTab & strComputer
End If
End If
Loop
InputFile.Close
out.Close
Loop