View Single Post
  #1 (permalink)  
Old December 22nd, 2003, 01:02 AM
stalker stalker is offline
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to stalker Send a message via MSN to stalker
Default File System Object in Server Side

HI!

I have this function.. It always worked.. now it doesn't and I don't know why coz I don't think I changed anything in my server.. I already instaled WinXp Pro in a brand new PC and tested the site but the error still appears...

What happens is that I am trying to use ASP File System Object and if I try to use the method FileExists or any other ordinary method it woks fine.. But it I try to get the handle to a File or Folder with the GetFile or GetFolder methods the site getts lazzy and doesn't open! It never returns an error.. but stays there for a long time.. Until i give up! I don't think there's nothing wrong with the script.. It works fine in Client Side.. but in Server side.. maybe you can help me.. It halts in the GetFolder statement! Thx

function listfolders() {
    var styles = new Array();

<%
    Dim ObjFSO, StyleCounter
    Dim objFolder
    Set ObjFSO = Server.CreateObject("Scripting.FileSystemObject")
    Set objFolder = objFSO.GetFolder(Server.MapPath("..\style\")) ''here!!
    StyleCounter = 0

    For Each objStyle in objFolder.SubFolders
        Response.write "(blablabla)"
        StyleCounter = StyleCounter + 1
    Next
%>
    return styles;
}