Or maybe:
Add a reference to Microsoft Scripting Runtime.Code:Public Sub CopyTheFiles() Dim FSO As Object On Error GoTo NOFSO Set FSO = CreateObject("Scripting.FileSystemObject") FSO.CopyFile "D:\Folder\*.ack","C:\Folder2\" , True Set FSO = Nothing Exit Sub NOFSO: MsgBox"FSO copy failed" End Sub




Reply With Quote