Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i want to search using C# like i give it the name and it give me the path so i can open it or delete it ...ETC
i want a method to make this directly not through open filedialog
i have a text box to make the user type the name of the folder/file and button to search
is it by an algorithm or there are any library in C# to do that give me any hints
Posted

1 solution

Your question is not really clear. If I'am imaging right use:
- System.IO.DriveInfo ( http://msdn.microsoft.com/en-us/library/system.io.driveinfo.aspx[^] )

And work with the following classes:
- DirectoryInfo http://msdn.microsoft.com/en-us/library/system.io.directoryinfo.aspx[^]
- FileInfo http://msdn.microsoft.com/en-gb/library/system.io.fileinfo.aspx[^]

Or ask detailled if you need more information.
 
Share this answer
 
v2
Comments
bbirajdar 29-Apr-13 14:48pm    
Good answer for a vague question .. +5
Sergey Alexandrovich Kryukov 29-Apr-13 15:51pm    
I agree with aspnet_regiis, but voted 4, as you should better add links to these types... Still, a good answer.
—SA
stibee 29-Apr-13 16:06pm    
Thanks you have right.
Sergey Alexandrovich Kryukov 29-Apr-13 16:27pm    
You are welcome. Now I up-voted by 5.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900