File listing

Trying to develop some different scripts, I was attempting to write a simple script that would just print out whatever files it found on the server. The code I got by snipping bits and parts from larger scripts and applying some logic to it and then rewrite it. Apperently, this logic wasn't so logical since the script won't work. I do not get an error message, it just never finishes loading (no, it does not have anything with AV to do, allready checked that). I guess the loop just never ends (infinite loops, the horror of programmers! :)).

Anyway, here is the simple little script, hoping someone can give me comments and or working scripts that perform this small task...

[code]<%
Dim fso, curfold, curfiles, ffile

Set fso = CreateObject("Scripting.FileSystemObject")
Set curfold = fso.GetFolder(Server.MapPath("."))
Set curFiles = curfold.Files

For Each ffile in curFiles

Response.Write ffile.Name & "<br>"

Next

%>[/code]

//s

Comments

  • I don't see anything wrong with your code.
    What happens when you do just
    [code]
    Dim fso
    Set fso = CreateObject("Scripting.FileSystemObject")
    [/code]


    With nothing else ? If the Systems goes blink even with this , then it IS something to do with the AV ?

    Try it and let us know.

    Faustine
    --------
    : Trying to develop some different scripts, I was attempting to write a simple script that would just print out whatever files it found on the server. The code I got by snipping bits and parts from larger scripts and applying some logic to it and then rewrite it. Apperently, this logic wasn't so logical since the script won't work. I do not get an error message, it just never finishes loading (no, it does not have anything with AV to do, allready checked that). I guess the loop just never ends (infinite loops, the horror of programmers! :)).
    :
    : Anyway, here is the simple little script, hoping someone can give me comments and or working scripts that perform this small task...
    :
    : [code]<%
    : Dim fso, curfold, curfiles, ffile
    :
    : Set fso = CreateObject("Scripting.FileSystemObject")
    : Set curfold = fso.GetFolder(Server.MapPath("."))
    : Set curFiles = curfold.Files
    :
    : For Each ffile in curFiles
    :
    : Response.Write ffile.Name & ""
    :
    : Next
    :
    : %>[/code]
    :
    : //s
    :

  • There is another very simple way. U can create a COM object in vc++ and use that object in your ASP. For more info reply to me.
    Have a nice time

    : I don't see anything wrong with your code.
    : What happens when you do just
    : [code]
    : Dim fso
    : Set fso = CreateObject("Scripting.FileSystemObject")
    : [/code]
    :
    :
    : With nothing else ? If the Systems goes blink even with this , then it IS something to do with the AV ?
    :
    : Try it and let us know.
    :
    : Faustine
    : --------
    : : Trying to develop some different scripts, I was attempting to write a simple script that would just print out whatever files it found on the server. The code I got by snipping bits and parts from larger scripts and applying some logic to it and then rewrite it. Apperently, this logic wasn't so logical since the script won't work. I do not get an error message, it just never finishes loading (no, it does not have anything with AV to do, allready checked that). I guess the loop just never ends (infinite loops, the horror of programmers! :)).
    : :
    : : Anyway, here is the simple little script, hoping someone can give me comments and or working scripts that perform this small task...
    : :
    : : [code]<%
    : : Dim fso, curfold, curfiles, ffile
    : :
    : : Set fso = CreateObject("Scripting.FileSystemObject")
    : : Set curfold = fso.GetFolder(Server.MapPath("."))
    : : Set curFiles = curfold.Files
    : :
    : : For Each ffile in curFiles
    : :
    : : Response.Write ffile.Name & ""
    : :
    : : Next
    : :
    : : %>[/code]
    : :
    : : //s
    : :
    :
    :

  • Well, the same thing... I've turned off the autoprotect and script blocking, it still won't work....

    //s

    : I don't see anything wrong with your code.
    : What happens when you do just
    : [code]
    : Dim fso
    : Set fso = CreateObject("Scripting.FileSystemObject")
    : [/code]
    :
    :
    : With nothing else ? If the Systems goes blink even with this , then it IS something to do with the AV ?
    :
    : Try it and let us know.
    :
    : Faustine
    : --------
    : : Trying to develop some different scripts, I was attempting to write a simple script that would just print out whatever files it found on the server. The code I got by snipping bits and parts from larger scripts and applying some logic to it and then rewrite it. Apperently, this logic wasn't so logical since the script won't work. I do not get an error message, it just never finishes loading (no, it does not have anything with AV to do, allready checked that). I guess the loop just never ends (infinite loops, the horror of programmers! :)).
    : :
    : : Anyway, here is the simple little script, hoping someone can give me comments and or working scripts that perform this small task...
    : :
    : : [code]<%
    : : Dim fso, curfold, curfiles, ffile
    : :
    : : Set fso = CreateObject("Scripting.FileSystemObject")
    : : Set curfold = fso.GetFolder(Server.MapPath("."))
    : : Set curFiles = curfold.Files
    : :
    : : For Each ffile in curFiles
    : :
    : : Response.Write ffile.Name & ""
    : :
    : : Next
    : :
    : : %>[/code]
    : :
    : : //s
    : :
    :
    :

  • Sure, give me some examples/places to find some info on the subject...

    //SoulMan - who just discovered that he has managed to miss spell his own username... * registering new account * :P


    : There is another very simple way. U can create a COM object in vc++ and use that object in your ASP. For more info reply to me.
    : Have a nice time
    :
    : : I don't see anything wrong with your code.
    : : What happens when you do just
    : : [code]
    : : Dim fso
    : : Set fso = CreateObject("Scripting.FileSystemObject")
    : : [/code]
    : :
    : :
    : : With nothing else ? If the Systems goes blink even with this , then it IS something to do with the AV ?
    : :
    : : Try it and let us know.
    : :
    : : Faustine
    : : --------
    : : : Trying to develop some different scripts, I was attempting to write a simple script that would just print out whatever files it found on the server. The code I got by snipping bits and parts from larger scripts and applying some logic to it and then rewrite it. Apperently, this logic wasn't so logical since the script won't work. I do not get an error message, it just never finishes loading (no, it does not have anything with AV to do, allready checked that). I guess the loop just never ends (infinite loops, the horror of programmers! :)).
    : : :
    : : : Anyway, here is the simple little script, hoping someone can give me comments and or working scripts that perform this small task...
    : : :
    : : : [code]<%
    : : : Dim fso, curfold, curfiles, ffile
    : : :
    : : : Set fso = CreateObject("Scripting.FileSystemObject")
    : : : Set curfold = fso.GetFolder(Server.MapPath("."))
    : : : Set curFiles = curfold.Files
    : : :
    : : : For Each ffile in curFiles
    : : :
    : : : Response.Write ffile.Name & ""
    : : :
    : : : Next
    : : :
    : : : %>[/code]
    : : :
    : : : //s
    : : :
    : :
    : :
    :
    :

  • Ok , so it is not the loop problem.
    Why not go the whole way an uninstall the AV and try again ? You could always reinstall it later

    Faustine
    --------
    : Well, the same thing... I've turned off the autoprotect and script blocking, it still won't work....
    :
    : //s
    :
    : : I don't see anything wrong with your code.
    : : What happens when you do just
    : : [code]
    : : Dim fso
    : : Set fso = CreateObject("Scripting.FileSystemObject")
    : : [/code]
    : :
    : :
    : : With nothing else ? If the Systems goes blink even with this , then it IS something to do with the AV ?
    : :
    : : Try it and let us know.
    : :
    : : Faustine
    : : --------
    : : : Trying to develop some different scripts, I was attempting to write a simple script that would just print out whatever files it found on the server. The code I got by snipping bits and parts from larger scripts and applying some logic to it and then rewrite it. Apperently, this logic wasn't so logical since the script won't work. I do not get an error message, it just never finishes loading (no, it does not have anything with AV to do, allready checked that). I guess the loop just never ends (infinite loops, the horror of programmers! :)).
    : : :
    : : : Anyway, here is the simple little script, hoping someone can give me comments and or working scripts that perform this small task...
    : : :
    : : : [code]<%
    : : : Dim fso, curfold, curfiles, ffile
    : : :
    : : : Set fso = CreateObject("Scripting.FileSystemObject")
    : : : Set curfold = fso.GetFolder(Server.MapPath("."))
    : : : Set curFiles = curfold.Files
    : : :
    : : : For Each ffile in curFiles
    : : :
    : : : Response.Write ffile.Name & ""
    : : :
    : : : Next
    : : :
    : : : %>[/code]
    : : :
    : : : //s
    : : :
    : :
    : :
    :
    :

  • Because it's extremely boring.. :P

    Could you give me some examples of the com-stuff? Uninstalling AV is my last resort, but if it have to come to that....

    //S

    : Ok , so it is not the loop problem.
    : Why not go the whole way an uninstall the AV and try again ? You could always reinstall it later
    :
    : Faustine
    : --------
    : : Well, the same thing... I've turned off the autoprotect and script blocking, it still won't work....
    : :
    : : //s
    : :
    : : : I don't see anything wrong with your code.
    : : : What happens when you do just
    : : : [code]
    : : : Dim fso
    : : : Set fso = CreateObject("Scripting.FileSystemObject")
    : : : [/code]
    : : :
    : : :
    : : : With nothing else ? If the Systems goes blink even with this , then it IS something to do with the AV ?
    : : :
    : : : Try it and let us know.
    : : :
    : : : Faustine
    : : : --------
    : : : : Trying to develop some different scripts, I was attempting to write a simple script that would just print out whatever files it found on the server. The code I got by snipping bits and parts from larger scripts and applying some logic to it and then rewrite it. Apperently, this logic wasn't so logical since the script won't work. I do not get an error message, it just never finishes loading (no, it does not have anything with AV to do, allready checked that). I guess the loop just never ends (infinite loops, the horror of programmers! :)).
    : : : :
    : : : : Anyway, here is the simple little script, hoping someone can give me comments and or working scripts that perform this small task...
    : : : :
    : : : : [code]<%
    : : : : Dim fso, curfold, curfiles, ffile
    : : : :
    : : : : Set fso = CreateObject("Scripting.FileSystemObject")
    : : : : Set curfold = fso.GetFolder(Server.MapPath("."))
    : : : : Set curFiles = curfold.Files
    : : : :
    : : : : For Each ffile in curFiles
    : : : :
    : : : : Response.Write ffile.Name & ""
    : : : :
    : : : : Next
    : : : :
    : : : : %>[/code]
    : : : :
    : : : : //s
    : : : :
    : : :
    : : :
    : :
    : :
    :
    :

  • Ok , Great . But don't know much about the com thing.The other poster might know.

    BTW SoulMan is *Always* better than SoulNam :-)

    Faustine
    --------

    : Because it's extremely boring.. :P
    :
    : Could you give me some examples of the com-stuff? Uninstalling AV is my last resort, but if it have to come to that....
    :
    : //S
    :
    : : Ok , so it is not the loop problem.
    : : Why not go the whole way an uninstall the AV and try again ? You could always reinstall it later
    : :
    : : Faustine
    : : --------
    : : : Well, the same thing... I've turned off the autoprotect and script blocking, it still won't work....
    : : :
    : : : //s
    : : :
    : : : : I don't see anything wrong with your code.
    : : : : What happens when you do just
    : : : : [code]
    : : : : Dim fso
    : : : : Set fso = CreateObject("Scripting.FileSystemObject")
    : : : : [/code]
    : : : :
    : : : :
    : : : : With nothing else ? If the Systems goes blink even with this , then it IS something to do with the AV ?
    : : : :
    : : : : Try it and let us know.
    : : : :
    : : : : Faustine
    : : : : --------
    : : : : : Trying to develop some different scripts, I was attempting to write a simple script that would just print out whatever files it found on the server. The code I got by snipping bits and parts from larger scripts and applying some logic to it and then rewrite it. Apperently, this logic wasn't so logical since the script won't work. I do not get an error message, it just never finishes loading (no, it does not have anything with AV to do, allready checked that). I guess the loop just never ends (infinite loops, the horror of programmers! :)).
    : : : : :
    : : : : : Anyway, here is the simple little script, hoping someone can give me comments and or working scripts that perform this small task...
    : : : : :
    : : : : : [code]<%
    : : : : : Dim fso, curfold, curfiles, ffile
    : : : : :
    : : : : : Set fso = CreateObject("Scripting.FileSystemObject")
    : : : : : Set curfold = fso.GetFolder(Server.MapPath("."))
    : : : : : Set curFiles = curfold.Files
    : : : : :
    : : : : : For Each ffile in curFiles
    : : : : :
    : : : : : Response.Write ffile.Name & ""
    : : : : :
    : : : : : Next
    : : : : :
    : : : : : %>[/code]
    : : : : :
    : : : : : //s
    : : : : :
    : : : :
    : : : :
    : : :
    : : :
    : :
    : :
    :
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories