Hello,
I have the following code which will move a folder and a set of files to another folder. How can I move only the files to the Destination folder without moving the sPrefix folder?
Code:
Dim sAttachLocation As String
sAttachLocation = sTempProjectFiles & Me.txtProjectNumber & sPrefix
Debug.Print sAttachLocation
If Dir(sAttachLocation, vbDirectory) = "" Then
'do nothing
Else Dim sDestination As String
If IsNull(Me.EstimateFolderLocation) Then
CreateEstimateRequestForm Me, Cancel, bProject, bWorkorder, bCompleteDt
End If
sDestination = Me.EstimateFolderLocation & "03) Scope_Engineering_Costs\"
Debug.Print sDestination
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFolder sAttachLocation, sDestination
I tried using CopyFiles but I got Run-time error '438': Object doesn't support this property or method.
Code:
fso.CopyFiles sAttachLocation, sDestination
Image shows how it saves it, I'd like to just move the files