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 & "\"
Set FSO = CreateObject("scripting.filesystemobject")
If FSO.FolderExists(FromPath) = False Then
MsgBox FromPath & " doesn't exist"
If FSO.FolderExists(ToPath) = False Then
MsgBox ToPath & " doesn't exist"
FSO.CopyFile Source:=FromPath & FileExt, Destination:=ToPath
MsgBox "You can find the files from " & FromPath & " in " & ToPath
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)