Sub Copy_Certain_Files_In_Folder() Dim FSO As Object Dim FromPath As String Dim ToPath As String Dim FileExt As String FromPath = "C:\mail" ToPath = "http://sharepoint" FileExt = "*.msg*" If Right(FromPath, 1) <> "\" Then FromPath = FromPath & "\" End If Set FSO = CreateObject("scripting.filesystemobject") If FSO.FolderExists(FromPath) = False Then MsgBox FromPath & " doesn't exist" Exit Sub End If If FSO.FolderExists(ToPath) = False Then MsgBox ToPath & " doesn't exist" Exit Sub End If FSO.CopyFile Source:=FromPath & FileExt, Destination:=ToPath MsgBox "You can find the files from " & FromPath & " in " & ToPath End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)