Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

new File(path).list() problem

Status
Not open for further replies.

DeSn

Programmer
Nov 20, 2001
111
0
0
BE
Anyone an idea why this doens't work if path is a

path="../MilesRoot/"
path="\\\\max1\\public\\"

new File(path).list()

The list is null. It works if path is f.e. "c:\\test\\
 
Which 'path' String are you talking about (max1 or MilesRoot) ?

Can you do a "dir \\path" ?

--------------------------------------------------
Free Database Connection Pooling Software
 
They both don't work :(

new FileOutPutStream(path) doesn't work eather.
 
path.isDirectory() gives errors but I don't know why because it is a directory :(
 
You want to do :

Code:
File f = new File("\\max1\\public");
File files[] = f.listFiles();
System.err.println(files.length);

--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top