![]()
Sub MoveFiles() Dim SrcPath As String Dim DestPath As String Dim FN As String Dim FilterString As String 'Be sure to include trailing backslash SrcPath = "C:\Users\owner\Documents\" DestPath = "C:\Users\owner\Documents\Dest\" FilterString = "*.xls?" FN = Dir(SrcPath & FilterString) If FN <> "" Then Do 'Name SrcPath & FN As DestPath & FN 'Moves the file FileCopy SrcPath & FN, DestPath & FN 'Copies the file FN = Dir Loop Until FN = "" End If End Sub
Bookmarks