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!
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.
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?
Re: Listing the shared folder on a remote computer
How does the "sharing" work? Is it a MS Windows feature?