|
|
Public Sub OrtoPhoto() Dim strCurrPatchOut As String, strCurrPatchIn As String, strFolderName As String, strFileName As String, i As Integer, Response Dim fso As Object strCurrPatchOut = "\\SERVER\Data\OrtoPhoto_1" strCurrPatchIn = "\\SERVER\Data\OrtoPhoto_2" Set fso = CreateObject("Scripting.FileSystemObject") 'fso.CreateFolder strCurrPatchIn strFolderName = Dir(strCurrPatchOut & "\86*", vbDirectory) ' Retrieve the first entry. Do While strFolderName <> "" Debug.Print strFolderName strFileName = Dir(strCurrPatchOut & "\" & strFolderName & "\" & strFolderName & ".*", vbNormal) Do While strFileName <> "" fso.CopyFile strCurrPatchOut & "\" & strFolderName & "\" & strFileName, strCurrPatchIn & "\" & strFileName, 0 strFileName = Dir Loop strFolderName = Dir Loop End Sub
strFolderName = Dir:
| Run-time error '5': Invalid procedure call or argument |