Search file with help of c#
I want to search "any type" of "file" or "folder" in any directory of my system with the help of c#.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sreejesh SPPosted Apr 24, 2013, 6:23 AM
DirectoryInfo di = new DirectoryInfo(Server.MapPath("uploads"));
FileInfo[] rgFiles = di.GetFiles("*.jpg");
The above code is use access jpeg files.so which type of files you want,that type files extention replace the .jpg and use the above code
Thanks
Sreejsh