Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个名为用户的文件夹。此文件夹 a 根目录下的 3 个子文件夹:A、B 和 C。我如何使用 vb.net 将文件复制到所有这些子文件夹的根目录中?
谢谢
看看这个例子
Dim fi As New FileInfo("D:\file1.txt") Dim dirs As DirectoryInfo() = New DirectoryInfo("D:\Root").GetDirectories() For Each d As DirectoryInfo In dirs fi.CopyTo(d.FullName, True) Next
希望能帮助到你。