Results 1 to 6 of 6

Thread: Directory listing of a website

  1. #1
    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.

  2. #2
    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.

  3. #3
    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.

  4. #4
    Join Date
    Nov 2009
    Posts
    518

    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. #5
    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));
    }
    }

  6. #6
    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.

Similar Threads

  1. How to get the full path in directory listing
    By Ilampirai in forum Operating Systems
    Replies: 5
    Last Post: 13-04-2011, 10:25 AM
  2. Listing the Files or Subdirectories in a Directory
    By Henryosa in forum Software Development
    Replies: 4
    Last Post: 26-02-2010, 06:39 PM
  3. How to print Directory Listing in Windows
    By Foy in forum Windows Software
    Replies: 5
    Last Post: 14-09-2009, 02:55 PM
  4. How to get a listing of expired Active Directory user accounts ?
    By Tom_Small in forum Windows Server Help
    Replies: 4
    Last Post: 17-05-2007, 09:29 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,887,210.20703 seconds with 17 queries