From an old program I wrote.
Hope I included everything you need.
Private Type SHFILEOPSTRUCT
hWnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAnyOperationsAborted As Boolean
hNameMappings As Long
lpszProgressTitle As String
End Type
Private Declare Function SHFileOperation _
Lib "shell32.dll" _
Alias "SHFileOperationA" _
(lpFileOp As SHFILEOPSTRUCT) As Long
Private Const FO_COPY = &H2
Private Const FOF_ALLOWUNDO = &H40
Private Const FOF_NOCONFIRMATION = &H10 ' Don't prompt the user.
Private Const FOF_NOCONFIRMMKDIR = &H200 ' don't confirm making any needed dirs
Public Function CopyFile(ByVal sSource As String, _
ByVal sDest As String, _
Optional bNoConfirmation As Boolean = True, _
Optional nTries As Long = DEFAULTTRIES, _
Optional nWait As Single = DEFAULTWAIT) As Boolean
Dim sh_op As SHFILEOPSTRUCT
Dim nAttempts As Long
On Error GoTo ERRORHANDLER
CopyFile = False
nAttempts = 0
TRYAGAIN:
With sh_op
.hWnd = 0
.wFunc = FO_COPY
.pFrom = sSource & vbNullChar & vbNullChar
.pTo = sDest & vbNullChar & vbNullChar
If bNoConfirmation Then
.fFlags = FOF_NOCONFIRMATION Or FOF_NOCONFIRMMKDIR
Else
.fFlags = FOF_NOCONFIRMMKDIR
End If
End With
If SHFileOperation(sh_op) = 0 Then
CopyFile = True
Else
If sh_op.fAnyOperationsAborted Then
msProblem = "User aborted operation."
Else
msProblem = "Unknown error. Check network connections and/or space available in destination."
End If
CopyFile = False
End If
Exit Function
ERRORHANDLER:
nAttempts = nAttempts + 1
If nAttempts <= nTries Then
waitSeconds nWait
Resume TRYAGAIN
Else
msProblem = "Unable to copy " & sSource & " to " & sDest & _
" (" & Err.Number & ": " & Err.Description & "

"
Exit Function
End If
End Function