• Post Reply Bookmark Topic Watch Topic
  • New Topic

Recursive file search

 
Anirvan Majumdar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone provide any information as to how one can go about searching for a file recursively. For eg : if C:\ is the parent drive how am i to search a file which might exist in a directory which is a subfolder of another directory present in c:\
 
Pradeep Kadambar
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a file handle from the path and use the File's list method to get a list of files under that directory.

Then check the files.
If directory
call the method passing the file path
else
process the file as you require.

That should be simple enough.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!