Hi there
example copy c:\folder one\*.* to c:\folder two\*.*
You can e.g. achieve this with an API function:
Public Declare Function SHFileOperation Lib "shell32.dll" Alias _
"SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long
' use one of these as modifiers
Public Const FOF_SILENT = &H4 ' don't create progress/report
Public Const FOF_SIMPLEPROGRESS = &H100 ' means don't show names of files
Public Const FOF_NOCONFIRMMKDIR = &H200 ' don't confirm making any needed
dirs
' use one of these as the operation
Public Const FO_COPY = &H2
Public Const FO_DELETE = &H3
Public Const FO_MOVE = &H1
Public Const FO_RENAME = &H4
Public Type SHFILEOPSTRUCT
hwnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAnyOperationsAborted As Long
hNameMappings As Long
lpszProgressTitle As String ' only used if FOF_SIMPLEPROGRESS
End Type
Sub CopyFiles(src As String, dst As String)
Dim op As SHFILEOPSTRUCT
op.pFrom = src
op.pTo = dst
op.fFlags = FOF_SILENT
op.wFunc = FO_COPY
Call SHFileOperation(op)
End Sub
Usage: CopyFiles "c:\folder one", "c:\folder two"
Cheers,
Martin