本文介绍了Vb.net ACL特殊文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们!我要将特定文件(xlsx)搜索到我的文档文件夹中,

但我收到有关权限的错误。我将vb.net设置为管理员





感谢您的帮助!



我的尝试:



Dim FolderPath As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)



Dim directory = FolderPath



Dim files()As System.IO.FileInfo



Dim dirinfo As New System.IO.DirectoryInfo(目录)



files = dirinfo.GetFiles(xlsx,IO.SearchOption.AllDirectories)错误行:




$ b

在mscorlib.dll中的'eccezione non gestita di tipo'System.UnauthorizedAccessException'







对于每个文件在文件中



ListBox1.Items.Add(文件)



下一页



End Sub

I guys! 'm tring to search specific file(xlsx) into my document folder,
but i get error about permission.I set the vb.net ication as Administrator


Thanks for any help!

What I have tried:

Dim FolderPath As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)

Dim directory = FolderPath

Dim files() As System.IO.FileInfo

Dim dirinfo As New System.IO.DirectoryInfo(directory)

files = dirinfo.GetFiles("xlsx", IO.SearchOption.AllDirectories) error line:



Eccezione non gestita di tipo 'System.UnauthorizedAccessException' in mscorlib.dll



For Each file In files

ListBox1.Items.Add(file)

Next

End Sub

推荐答案



这篇关于Vb.net ACL特殊文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 07:42