I got a script that checks files in a directory but I keep on getting this error
vbscript error Name redefined 'ForReading'
how do I fix it
Dim objFile, maxspeed, auditneededDim objFSO:Set objFSO=CreateObject("Scripting.FileSystemObject")Dim objFolder: Set objFolder=objFSO.GetFolder("C:\Documents and Settings\All Users\Documents\out2\")For Each File in objFolder.Files If lCase(objFSO.GetExtensionName(file.name))="ini" Then Const ForReading = 1 Set objFile = objFSO.OpenTextFile(file.path, ForReading) Dim arrFileLines() i = 0 Do Until objFile.AtEndOfStream Redim Preserve arrFileLines(i) arrFileLines(i) = objFile.ReadLine i = i + 1 Loop For Each strLine in arrFileLines dim myspeedaudit myspeedaudit=InStr(1, strLine, "Max_Speed=", 1) if myspeedaudit = 1 Then maxspeed = Split(strLine, "=", -1, 1) if maxspeed(1) > 96 Then auditneeded="y" Wscript.Echo "Max speed = " & maxspeed(1) & " auditneeded = " & auditneeded End If End if Next objFile.Close Set objFile=Nothing End IfNext
Set objFile = objFSO.OpenTextFile(file.p
The problem is that the enumerations are not working in ASP