• Post Reply Bookmark Topic Watch Topic
  • New Topic

Find the path of a file  RSS feed

 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bubi gupta
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!