Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , , , ,

Sponsored Links



Directory listing of a website

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 29-01-2010
Member
 
Join Date: Dec 2009
Posts: 296
Directory listing of a website

Hello,
I'd like to know how to list a directory in a folder with a remote server.
I managed on a local server. I also managed to download a file from a remote server (with URLConnection), but I can not find the solution to list a directory with a remote server. Any help on this guys. Pleas if you know about it then help me. Any small code for demonstration will be helpful.
Reply With Quote
  #2  
Old 29-01-2010
Member
 
Join Date: Nov 2009
Posts: 583
Re: Directory listing of a website

Hi,
The HTTP protocol does not allow this, so the only solution would be to set up a server on the page that you return this information formatted as you like. But I think this is going to be difficult to code. Hence, you have to use a appropriate protocol to do the following coding. I think the Windows file sharing protocol is 455, though I am not sure because I have never used it in my code. But you can try it.
Reply With Quote
  #3  
Old 29-01-2010
Member
 
Join Date: Dec 2009
Posts: 296
Re: Directory listing of a website

Hello,
Thanks for your reply. I am thinking about something, I'll download a xml file which has all the characteristics of files in the folder list (he must know that the file will contain 5 to 10 files maximum). I download the XML file, and read in order to download each file folder with URLConnection. Thank you again for your idea.
Reply With Quote
  #4  
Old 29-01-2010
Member
 
Join Date: Nov 2009
Posts: 520
Re: Directory listing of a website

Hello,
I think you need to use a protocol such as FTP or something like that, which is used for sharing files or to access files. Moreover in HTTP, some servers will return you a page listing the directory, is what you get them back? I advise you to spend even other than HTTP protocols. There are many such protocols, if you spend some time, you will get an idea.
Reply With Quote
  #5  
Old 29-01-2010
Member
 
Join Date: Dec 2009
Posts: 296
Re: Directory listing of a website

Hello,
This is the code I am trying to do. Please check the code, and if I am wrong somewhere then please correct me.
Code:
{
{
URL urltest = new URL("http://adressesiteinternet/fichier.xml");
URLConnection cnt = urltest.openConnection();
for (int i =0, I <list.size(); I + +){
URL urltest = new URL(list.get(i));
}
}
Reply With Quote
  #6  
Old 29-01-2010
Member
 
Join Date: Nov 2009
Posts: 333
Re: Directory listing of a website

Hello,
Your upper management can create a user for you to access FTP, but under a more general use the XML file is more efficient because you can add info (as you said) to each file in plugin your document and you will not have to download / access to other files to see which ones concern you. I think this will be a good idea and more easy for you.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Directory listing of a website"
Thread Thread Starter Forum Replies Last Post
How to get the full path in directory listing Ilampirai Operating Systems 5 13-04-2011 11:25 AM
FTP problem (directory listing) on Windows 2008/IIS7.5 sp Windows Server Help 1 15-06-2010 04:47 AM
Listing the Files or Subdirectories in a Directory Henryosa Software Development 4 26-02-2010 06:39 PM
How to print Directory Listing in Windows Foy Windows Software 5 14-09-2009 03:55 PM
How to get a listing of expired Active Directory user accounts ? Tom_Small Windows Server Help 4 17-05-2007 10:29 PM


All times are GMT +5.5. The time now is 04:10 AM.