执行文件搜索 [英] Performing file search

查看:64
本文介绍了执行文件搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,在这里我被困在一个项目中,我需要进行文件搜索,我不知道确切的名字是有人可以帮助我(这是vb.net),谢谢您.

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 vb.net) thank you

推荐答案

来自MSDN:

http://support.microsoft.com/kb/306666 [
From MSDN:

http://support.microsoft.com/kb/306666[^]

Regards


使用此
和实施
你自己
Use this
And Implement
yourself
Directory.GetFiles("C:\Windows", "*.txt", SearchOption.AllDirectories)



您可以通过文本框传递驱动器名称
可能会对您有帮助.
调用此按钮单击
并在
之类的DataGridView中获取数据



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))


像这样尝试或查询字符串
try like this on or query string
Select * From your_tableName where fieldName Like '' %''


将您要搜索的文本放在引号之间['']
在%号之前.这可能对您有帮助或
在此处尝试SQL WILDCARDS [
^ ]


Pass the text you want to search in between the quotes [ '' '']
before % sign.may this help you or
Try SQL WILDCARDS here [^]


这篇关于执行文件搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆