|
| |||||||||
| Tags: directory, file, file system, java, javaio, listing of files, website |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| 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. |
|
#2
| |||
| |||
| 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. |
|
#3
| |||
| |||
| 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. |
|
#4
| |||
| |||
| 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. |
|
#5
| |||
| |||
| 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));
}
} |
|
#6
| |||
| |||
| 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. |
![]() |
|
| Thread Tools | Search this Thread |
| |
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 |