Forum Moderators: open

Message Too Old, No Replies

problem in using FSO in asp

is there is any error

         

nimgow

7:37 am on Jun 10, 2004 (gmt 0)

10+ Year Member



<%
dim oFSO, oFolder, oFile
set oFSO = server.createobject("Scripting.FileSystemObject")
set oFolder = oFSO.GetFolder("C:\MyFolder")

response.write("<ul>")

for each oFile in oFolder.Files
response.write("<li>" + oFile.Name + " - " + oFile.DateCreated + "</li>")
next

response.write("</ul>")

%>
i am trying to execute the code but ie does not replys any thing to this in the status it shows searching site for some time and it displays done

mattur

12:36 pm on Jun 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think you just need to use the string concatenation operator "&" rather than "+". Because DateCreated is numeric it appears that using the "+" operator makes asp try to add, rather than concat.

response.write("<li>" & oFile.Name & " - " & oFile.DateCreated & "</li>")

HTH

duckhunter

12:42 pm on Jun 10, 2004 (gmt 0)

10+ Year Member



Also, make sure the IUSR account has the rights to read the folder you are referencing. If it's not under wwwroot then you will need to grant access explicitly.

nimgow

12:33 pm on Jun 11, 2004 (gmt 0)

10+ Year Member



hey i have used + instead of & then also it is not running

in the staus i can able to find the websitefound and waiting for reply

after some time satus becomes done

but it displays page cannot be found

i have checked with my iis i don't have any problem + only this fso file is not working all other asp pages are working fine

ASPwiz

1:03 pm on Jun 11, 2004 (gmt 0)

10+ Year Member



Turn Zone Alarm off.
Also, disable norton antivirus script checking.

One of the above is the problem here.

Easy_Coder

5:07 pm on Jun 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



turn off friendly error msgs and post your error...

I took your code and applied mattur's suggestion of replacing + with & and it runs fine on my box.

nimgow

11:50 am on Jun 12, 2004 (gmt 0)

10+ Year Member



finaly i done it

just i have uninstalled the nortran from my system
it works smoothly

thanks for the support