getting invalid procedure call or argument in vbscript

后端 未结 2 1548
迷失自我
迷失自我 2020-12-02 02:20

I have the below code..I am getting an invalid call or procedure at this statement txsOutput.Writeline txsInput1.ReadAll ..The combination file is ust a text file which has

2条回答
  •  萌比男神i
    2020-12-02 02:55

    Without actually seeing that particular input file there isn't much more we can tell you. However, you may be able to isolate the source of the error by replacing:

    txsOutput.Writeline txsInput1.ReadAll
    

    with something like this:

    On Error Resume Next
    Do Until txsInput1.AtEndOfStream
      line = txsInput1.ReadLine
      If Err Then
        WScript.Echo "Operation:   Read" & vbNewLine _
          "Error:       " & Err.Number & vbNewLine _
          "Description: " & Err.Description & vbNewLine _
          "Line:        " & txsInput1.Line
        WScript.Echo "Text:        " & line
      End If
      Err.Clear
    
      txsOutput.WriteLine line
      If Err Then
        WScript.Echo "Operation:   Write" & vbNewLine _
          "Error:       " & Err.Number & vbNewLine _
          "Description: " & Err.Description & vbNewLine _
          "Line:        " & txsInput1.Line
        WScript.Echo "Text:        " & line
      End If
      Err.Clear
    Loop
    On Error Goto 0
    

    Inspecting the input file with a hex editor may also be an option.

提交回复
热议问题