Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Anyone know how to get a list of files from an http server? I want to pass a function or method a url and have it give me a list of files/directories.

 

I know you can do it with FTP, but I'm using BITS so I have to use HTTP. Thanks

  • 2 weeks later...
Posted
I don't think this is possible.... what you could do is gather as much information a possible about the directory structure by parsing the HTML code the server sends you. Like a search engine spyder.

-=splice=-

It's not my fault I'm a Genius!

Posted

Depends if the remote server is configured to support this. There is an option under IIS to allow the viewing of directory list, however, HTTP does not natively support any command such as LIST that is implemented by FTP.

 

The two options are:

 

1.) Do a "GET /" and see if it gives you a list of the files

 

or

 

2.) Work out what files are available by manually parsing the HTML as suggested by Splice.

 

:)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...