Public Sub CopyDerictory(ByVal DirectorySrc As DirectoryInfo
Dim strDirectoryDesPath As String = DirectoryDes
If Not Directory
Directory
End If
Dim f
fs = DirectorySrc
For Each f In fs
File
Next
Dim DirSrc
Dirs = DirectorySrc
// 遞歸調用自身
For Each DirSrc In Dirs
Dim DirDes As New DirectoryInfo(strDirectoryDesPath)
CopyDerictory(DirSrc
Next
End Sub
Private Sub Button
CopyDerictory(New DirectoryInfo("C:Documents and SettingsusernameFavorites")
End Sub
From:http://tw.wingwit.com/Article/program/net/201311/14105.html