| Author |
Find the path of a file
|
renu richard
Ranch Hand
Joined: Oct 06, 2008
Posts: 116
|
|
Hi,
I want to know, is ther any java method available for doing this.
Requirement is like this. I need to find the location of a file in a directory. The file might be present in the parent directory or might even be present in the child directory.
|
Cheers,
Richard
|
 |
Bubi gupta
Greenhorn
Joined: Sep 21, 2009
Posts: 14
|
|
Hi, Renu
This is very easily possible in java.Just give a search with a proper keyword .The souce code is also very easily available.You probably need to use proper API calls.Check the net.
|
Thanks a lot in advance for your support
BUBI gupta
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19232
|
|
|
Check out File.listFiles, possibly in combination with a FileFilter. You will need a recursive search: if a child of a folder is a folder itself, call the same method on that sub folder.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: Find the path of a file
|
|
|