Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Display all files in an online folder?  RSS feed

 
Mr P Bradders
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would I go about obtaining the file names of all files in an online folder. Eg. the user enters http://www.myurl.com/myfolder/ and all files in this folder are obtained?

Regards.
 
Jason Moors
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends what you are trying to do....

1) If you are trying to develop a client application which connects to a web server you would need to configure the web server to provide directory listings. Generally this is disabled as it is a security risk.

2) If you are trying to develop a server application which provides directory listing, you need to write an simple application which uses java.io.ServerSocket and creates a Thread for each connection which would get the directory listing a pass the list back as an html string.

Jason.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!