十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
Vb.net获取某个目录下文件夹名称(不包含隐藏文件夹)实现代码如下:
创新互联自2013年起,是专业互联网技术服务公司,拥有项目做网站、成都网站建设网站策划,项目实施与项目整合能力。我们以让每一个梦想脱颖而出为使命,1280元丰镇做网站,已为上家服务,为丰镇各地企业和个人服务,联系电话:13518219792
Dim dir As New DirectoryInfo("D:\")
For Each d As DirectoryInfo In dir.GetDirectories
ComboBox1.Items.Add(d.Name)
Next
dim finfo as new fileinfo(d.name)
if (finfo.attributes and FileAttributes.Hidden)FileAttributes.Hidden then
ComboBox1.Items.Add(d.Name)
end if
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
For Each FileName As String In IO.Directory.GetFiles("E:\音乐", "*.mp3")
TextBox1.Text = vbNewLine IO.Path.GetFileName(FileName)
Next
End Sub
这篇文章介绍了拷贝整个目录下所有子目录及文件的代码 有需要的朋友可以参考一下 复制代码 代码如下: lishixinzhi/Article/program/net/201311/14105
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Process.Start("C:\1.txt")
End Sub
Imports System.IO '引用命名空间
Dim AppPath As String = Directory.GetCurrentDirectory() '获取应用程序的当前工作目录
Process.Start(AppPath) '打开当前目录