Aşağıda ki kod, birden fazla xcopy nasıl yazmalıyız?
Sonucları nasıl mail atması sağlana bilir?

kaynak1 ="c:\Data"
kaynak2="\\sbs\Test"
hedefyer ="F:\test"
backupcmd1=" /d /s /v /y /z"

strSMTPFrom = "[email protected]"
strSMTPTo = "[email protected]"
strSMTPRelay = "192.168.1.2"
strSubject = "File copy completed"

kaynak1 = cleanPath(kaynak1)
hedefyer = cleanPath(hedefyer)

Set WshShell = CreateObject ("Wscript.shell")
Set objExec = WSHshell.Exec("xcopy " & chr(34) & kaynak1 & "\1\*.*" & chr(34) & " " & chr(34) & hedefyer & "\SBS\1\" & chr(34) & backupcmd1)
Set objExec = WSHshell.Exec("xcopy " & chr(34) & kaynak1 & "\2\*.*" & chr(34) & " " & chr(34) & hedefyer & "\SBS\2\" & chr(34) & backupcmd1)
' xcopy birden tanımlanınca mail atmıyor, mail atması nasıl sağlanır.

strResult = ""
Do While Not objExec.StdOut.AtEndOfStream
strTemp = objExec.StdOut.ReadLine()
strResult = strResult & vbCRLF & strTemp
Loop

'Email bildirimi
Set oMessage = CreateObject("CDO.Message")
oMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
oMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSMTPRelay
oMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
oMessage.Configuration.Fields.Update
oMessage.Subject = strSubject
oMessage.From = strSMTPFrom
oMessage.To = strSMTPTo
oMessage.TextBody = "Kopyalama başarı / başarısızlık icin gunluğunu gozden gecirin, tamamladı." & vbCRLF & vbCRLF & strResult
oMessage.Send

Function cleanPath(strPath)
If Right(strPath, 3) = "*.*" Then
strPath = Left(strPath, Len(strPath) - 3)
End If
If Right(strPath, 1) = "\" Then
strPath = Left(strPath, Len(strPath) - 1)
End If
cleanPath = strPath
End Function
__________________