Click here to Skip to main content
15,742,619 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello, here I am stuck in a project I need to do a File Search I do not know the exact name is what someone can help me (this is thank you
Updated 11-Aug-11 3:04am
Suresh Suthar 11-Aug-11 8:14am    
Would you please translate this in English.
RaviRanjanKr 11-Aug-11 8:16am    
Please write your question in English. we will not able to get your question in this way. :)
S Houghtelin 11-Aug-11 8:20am    
Bonjour, s'il vous plaît utiliser l'anglais comme ce forum est en anglais. Par ailleurs, votre question ne fournissent pas d'informations suffisantes pour quiconque de vous aider.
[no name] 11-Aug-11 9:50am    
Check this

Share this answer
Use this
And Implement
Directory.GetFiles("C:\Windows", "*.txt", SearchOption.AllDirectories)

You can Pass the Drive name through a text box
may this will help you.
Call this on button Click
and Get your Data Inside a DataGridView like
DataGridView1.DataSource = Directory.GetFiles("C:\Windows", "*.txt", SearchOption.AllDirectories)

or Do like this
List1.Items.AddRange(Directory.GetFiles("C:\Windows", "*.txt", SearchOption.AllDirectories))
Share this answer
amineel9 11-Aug-11 9:18am    
how can i get the file ?
Karwa_Vivek 11-Aug-11 9:22am    
using the Second Command [List1.Items]
you will Get the exact path of your File where it is located.
Go there and get it.And if you want it through the app only ,then
Is better to Post a new Question out there.You know Points Matters
amineel9 11-Aug-11 9:47am    
try like this on or query string
Select * From your_tableName where fieldName Like ' %'

Pass the text you want to search in between the quotes [ ' ']
before % sign.may this help you or
Try SQL WILDCARDS here [^]
Share this answer
nagendrathecoder 11-Aug-11 8:36am    
Not what he intended
no si note in sql its
Share this answer
nagendrathecoder 11-Aug-11 8:37am    
no need to post an answer, u can comment to his answer
Karwa_Vivek 11-Aug-11 8:42am    
Means You want Files to Search .not Data .am I correct now?
amineel9 11-Aug-11 8:46am    
yes just a file.txt

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