PL Попробуйте следующее: сменить папки согласно вашим требованиям.
Sub Copy_Folder()
'This example copy all files and subfolders from FromPath to ToPath.
'Note: If ToPath already exist it will overwrite existing files in this folder
'if ToPath not exist it will be made for you.
Dim FSO As Object
Dim FromPath As String
Dim ToPath As String
FromPath = "C:\Process_Contract_Notes" '<< Change
ToPath = "C:\Process" '<< Change
If Right(FromPath, 1) = "\" Then
FromPath = Left(FromPath, Len(FromPath) - 1)
End If
If Right(ToPath, 1) = "\" Then
ToPath = Left(ToPath, Len(ToPath) - 1)
End If
Set FSO = CreateObject("scripting.filesystemobject")
If FSO.FolderExists(FromPath) = False Then
MsgBox FromPath & " doesn't exist"
Exit Sub
End If
FSO.CopyFolder Source:=FromPath, Destination:=ToPath
MsgBox "You can find the files and subfolders from " & FromPath & " in " & ToPath
End Sub
Просьба провести исследование самостоятельно, используя Google или другие поисковые системы, и вы найдете много помощи. Поскольку вы новичок в SO, я предоставляю код в качестве ответа. – skkakkar
@skkakkar. Спасибо за помощь. Это правда, что, как новичок, я не могу использовать поиск правильно. Я искал googled, но нашел макрос, чтобы переместить всю папку A в папку B, но не файлы и папки в папке A в папку B. Надеюсь, я смогу узнать больше, чтобы найти ответ, который уже существует. С уважением –