I'm writing an application that scans shared folders on networked computers. I've heard that Universal Naming Convention is an easy and standard way to access LAN computers, but for some reason, when I declare a File object referencing a LAN computer (i.e. File comp = new File("\\\\samplecomp"); ) I cannot get the program to recognize that this location exists. However, when I specify a particular folder on the LAN computer in the File constructor, I am able to read it perfectly well just like any other File object.
Can anyone tell me how to use UNC to access networked comps in Java? I basically need a way to get a handle on the LAN comp so I can search it for files.
If you type 'dir \\samplecomp' at the DOS command line, I don't think it would work either - you need a shared folder name. If you do a search for '\\sampecomp', windows will list the shared folders but I wouldn't be surprised if this was done with some windows api which is not available to third parties. [ August 09, 2004: Message edited by: Rovas Kram ]