Dim strFolder
Dim objNetwork
Set objNetwork = CreateObject("WScript.Network")
strFolder = "C:\Documents and Settings\" & objNetwork.UserName & "\Local Settings\Application Data\Microsoft\Outlook\"
Set objFso = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFso.GetFolder (strFolder)
For Each objFile In objFolder.Files
If UCase(objFso.GetExtensionName (objFile.Path)) = "PST" Then
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("c:\CopyWithVss.bat """ & objFile.Path & """ C:\pst"), 1, True
End If
Next
|