C#如何查找隐藏的指定文件?如找到文件【指定文件.txt】,可参照下方代码。
DirectoryInfo directoryInfo = new DirectoryInfo(@label3.Text); FileInfo[] fileList = directoryInfo.GetFiles("指定文件.txt", SearchOption.AllDirectories); foreach (FileInfo File in fileList) { if ((File.Attributes | FileAttributes.Hidden) == File.Attributes) { } }