Code: Select all
Dim fso As Object
Set fso = VBA.CreateObject("Scripting.FileSystemObject")
' Parameters.
orgFilePath = ActiveWorkbook.Path & "\pitLake_h3d\"
filePath = ActiveWorkbook.Path & "\temp\"
inputFile = inputSheet & ".STG"
If fso.fileexists(orgFilePath & inputFile) Then
fso.CopyFile (orgFilePath & inputFile), (filePath & inputFile), True
End If