Wednesday, October 16, 2002 12:14 AM
If you are talking about Windows, you cannot access the client's directory until and unless it is shared. Still, if you want, you cannot access the whole directory structure until the root is shared. only the subfolders and files of a particular shared folder are accessible for you.
Now consider you get access to a shared folder under Windows. You are now required to create a File object to point to the shared folder For example :
File remoteFile = new File("pcname\shared_folder_name");
Now you can create an array of Files(which can contain both files and folders for Java), and then access the subfolders or files under that shared folder. If you want to get the names of the subfolders and files under the shared folder, you can use the following method.
File list = f.listFiles();
feel free to ask more. Regards.