Results 1 to 4 of 4
  1. #1
    c4rb0n is offline Member
    Join Date
    Feb 2012
    Posts
    2
    Rep Power
    0

    Default Listing the shared folder on a remote computer

    Hi someone who knows how you can list shared folders on a remote computer.
    e.g. all folders on 192.168.1.1

    It's possible to list folder/files if I enter a shared folder on the remote computer.
    File dir = new File("\\192.168.1.1\share");
    File[] files = dir.listFiles();
    Somehow this doesn't work
    File dir = new File("\\192.168.1.1");
    File[] files = dir.listFiles();

    Thanks!

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,397
    Rep Power
    25

    Default Re: Listing the shared folder on a remote computer

    There is a discussion in the API doc for the File class that says how to define the path for different types of paths.

    What you are showing looks like an IP address and not a Windows UNC pathname.

  3. #3
    c4rb0n is offline Member
    Join Date
    Feb 2012
    Posts
    2
    Rep Power
    0

    Default Re: Listing the shared folder on a remote computer

    Thanks for the reply.
    So is there any other way to list the shared folder on any remote system?

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,397
    Rep Power
    25

    Default Re: Listing the shared folder on a remote computer

    How does the "sharing" work? Is it a MS Windows feature?

Similar Threads

  1. Replies: 0
    Last Post: 06-08-2011, 07:48 PM
  2. detecting folder listing
    By antiC in forum New To Java
    Replies: 1
    Last Post: 02-17-2011, 12:13 AM
  3. Folder Creation On Shared Hosting Account
    By arpitgadle in forum Java Servlet
    Replies: 2
    Last Post: 10-03-2009, 02:04 PM
  4. Access Linux shared folder from Windows OS
    By nitinpjairaj in forum Networking
    Replies: 3
    Last Post: 08-26-2008, 06:14 PM
  5. how to access shared file/folder in LAN
    By ksheetiz in forum Networking
    Replies: 1
    Last Post: 05-24-2008, 04:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •