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、B、および C の 3 つのサブフォルダがあります。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
それが役に立てば幸い。