VBScript problem processing txt file with a function.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chi2jjk
    New Member
    • Sep 2007
    • 6

    VBScript problem processing txt file with a function.

    Hello experts (bow),

    In the code snippet below, I am getting an "Expected End Of Statement" error that is pointing to the middle of the name of the function. Specifically the "c" in fnMaxiclean. Any help is greatly appreciated. I have triple-checked that there are no spelling errors.

    Code:
    '' Open the file
    	Set objFile = objFSO.OpenTextFile(strFileName, ForReading)
    
    '' Clean the file line-by-line
    	Do Until objFile.AtEndOfStream
    		strText = objFile.ReadLine
    		strNText = strNText & fnMaxiclean strText
    		strText = ""
    	Loop
    
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    '' Write out to new file
    	Set objFile = objFSO.CreateTextFile(strNewFileName)
    
    '' populate contents of new file
    	objFile.WriteLine strNText
    
    '' close the new file
    	objFile.Close
    Thank you,
    Jeff
  • JohnClayton
    New Member
    • Sep 2009
    • 1

    #2
    I suppose you should write:
    strNText = strNText & fnMaxiclean (strText)

    John Clayton - Adersoft
    Need a good VBScript editor? Try VbsEdit

    Comment

    Working...