Jump to content

How can i get the list of all files in any folder


Guest oralfa

Recommended Posts

Hi to everyone!Can anybody help me? I am looking for an ASP function, that gives me the list of names of all files in any folder on the server. Does that function exist?

Link to comment
Share on other sites

Try this:

<%    ' Retrieve directory from filesystem.    Set FS = Server.CreateObject("Scripting.FileSystemObject")    Set Dir = FS.GetFolder(Server.MapPath("/foldername"))        ' Write out the name of each file in directory.    For each fileItem in Dir.files        Response.Write(fileItem.Name)    Next%>

Link to comment
Share on other sites

Hi to everyone!Can anybody help me? I am looking for an ASP function, that gives me the list of names of all files in any folder on the server. Does that function exist?
First of all you will not be able to see anything unles directory browsing is enabled. If it is so, why bodder whith a script when IE or WinExplorer can do the job.But I have the feeling that you are trying to do some hacking, and steal somthing from somewhere...You could have used google instead of posting here, it might have been faster !
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...