How do I find a particular file in my harddisk?

  • Thread starter Thread starter Chrysan
  • Start date Start date
C

Chrysan

How do i write code in Visual Basic .Net to find the path
of a particular filename (e.g. test.txt) in my harddisk?

thanks.
 
I can't found a suitable function in System.IO namespace,
that's why i post my question here.

The path of the file, i would like to find is unknown. i
will supply the filename in my code, and i would like to
find the path of the file. Can you help me?
 
Well ...

I am unsure if there is a function or class in the IO namespace that would
assist with this directly.. although.. you could just load files into an
array or even better a hashtable and search for it through there?

If i find something ill post back..
 
Previous post was posted prematurely.. you could use the

System.IO.Directory.GetFiles("somepath","somesearchstring");
that should be faster... you just have to iterate through all your
directories...

let me know if it helps
 
Back
Top