First of all,
want to greet all of you at MRExcel community. Your posts and solutions have been a great help to me over the last few yeary, so I want to thank you all!
I'm not new to VBA but using FSO is little new to me so maybe i'm doing something wrong.
And now the problem. I can't figure out how to copy all the files and folders from a root of a CD/DVD (works if i use a folder from the C:, D: or some other drive, as long as it isn't root). This is the code:
Sub Copy_FO()
Dim FSO As Object
Dim COPY_FROM As String
Dim COPY_TO As String
COPY_FROM = "D:" 'source path-CD ROOT
COPY_TO = "C:\test" 'target path
Set FSO = CreateObject("scripting.filesystemobject")
FSO.CopyFolder Source:=COPY_FROM, Destination:=COPY_TO
MsgBox "Done!"
End Sub
Thank you!
want to greet all of you at MRExcel community. Your posts and solutions have been a great help to me over the last few yeary, so I want to thank you all!
I'm not new to VBA but using FSO is little new to me so maybe i'm doing something wrong.
And now the problem. I can't figure out how to copy all the files and folders from a root of a CD/DVD (works if i use a folder from the C:, D: or some other drive, as long as it isn't root). This is the code:
Sub Copy_FO()
Dim FSO As Object
Dim COPY_FROM As String
Dim COPY_TO As String
COPY_FROM = "D:" 'source path-CD ROOT
COPY_TO = "C:\test" 'target path
Set FSO = CreateObject("scripting.filesystemobject")
FSO.CopyFolder Source:=COPY_FROM, Destination:=COPY_TO
MsgBox "Done!"
End Sub
Thank you!