preoblem with fileobject codes

Results 1 to 3 of 3

Thread: preoblem with fileobject codes

  1. #1
    Kelvin Guest

    Default preoblem with fileobject codes

    I refer to Fileobject code and tried out put some how the code seem not working and i&#039;m not sure what is wrong can any body help.<BR><BR>Please contact me as soon as possible as I&#039;m meeting my assignment deadline soon.<BR>Thanks<BR>Below are the Error message and my coding<BR><BR>Microsoft VBScript compilation error &#039;800a0408&#039; <BR>Invalid character<BR>/ReportViewer/Main.asp, line 35 <BR><BR>Code<BR>---------------------<BR>Dim filesystem <BR>Dim folder <BR>Dim filecollection <BR>Dim mypath <BR>mypath="/Reports" <BR>Response.Write Server.MapPath(mypath) <BR>Set filesystem = Server.CreateObject("Scripting.FileSystemObject") <BR>Set folder = filesystem.GetFolder(server.mappath(mypath)) <BR>Set filecollection = folder.Files <BR>For Each file in filecollection <BR>response.write & "<BR>" <BR>Next filesystem=close <BR>set Filesystem=nothing <BR>set Folder=nothing <BR>set filecollection=nothing <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: preoblem with fileobject codes

    which one is line 35?<BR><BR>i&#039;ll make an assumption and say it&#039;s the line which says :<BR><BR>response.write & "<BR>"<BR><BR>take that and change it to<BR><BR>response.write & vbcrlf<BR><BR>and drop filesystem.close() one line down.<BR><BR>j

  3. #3
    Kelvin Guest

    Default RE: preoblem with fileobject codes

    Actually the problem is not in the code <BR>response.write & "BR"<BR><BR>But one line above that I Have at below<BR><BR>Code<BR>-------------------------------<BR>For Each file in filecollection<BR>--------------------------------<BR><BR>Error Message<BR>--------------<BR>Invalid character<BR><BR>So I&#039;m not sure what is the Problem<BR><BR>Please Help Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts