I’m trying to use a for…in loop to access a property of the ASP Files object. When the for loop gets executed, it doesn’t enter the loop, instead it immediately falls through. I know that the folder I’m referencing exists and that it contains 11 files. Would someone mind look at my for…in loop and telling me what is wrong?
[code=php]
fs=Server.CreateObject(“Scripting.FileSystemObject”);
if (fs.FolderExists(Server.MapPath(“/IMDb Movie HTML”))==true)
Response.Write(“<p>Folder exists</p><br />”);
else
Response.Write(“<p>Folder Not Found</p><br />”);
fo=fs.GetFolder(Server.MapPath(“/IMDb Movie HTML”));
Response.Write(“<p>Before for loop: filename=”+fo.Files.Name+”</p><br />”);
for (file in fo.Files)