Voilà, pourquoi faire simple … 
Si ça intéresse des gens j’ai mis en pièces jointes un script vb pour synchroniser plusieurs dossiers en une fois.
[code]Option Explicit
'============================================================================
Const C_TIMEPOLL = 1000 '1 second
Const C_TIMEOUT = 2400000 '40 minutes
Const C_BACKUPAPP = « robocopy.exe »
Const C_BACKUPAPP_PARAM = « /MIR /XO /Z /R:2 /W:3 /NP /FP /NDL »
Const C_SHUTDOWN = 1
Const C_SLEEP = 2
Const C_SHUTDOWN_CMD = « shutdown /f /s /t 0 » 'shtudown
Const C_SLEEP_CMD = « rundll32 powrprof.dll,SetSuspendState » 'sleep
'============================================================================
Main
Sub Main()
Dim shutdownAfterExec, cmdAfterBackup
Dim backupSrcList, backupDestList, logDir
Dim index
Dim usageText
usageText = « Usage: cscript backup.vbs /s source /d destination /l log /u shutdown /e command » & vbCrLf & vbCrLf & _
" * source :: Source directory or comma-separated list" & vbCrLf & vbTab & _
« (drive:\path or \server\share\path or drive:\path,drive:\path). » & vbCrLf & vbCrLf & _
" * destination :: Destination directory or comma-separated list" & vbCrLf & vbTab & _
« (drive:\path or \server\share\path or drive:\path,drive:\path). » & vbCrLf & vbCrLf & _
" * log :: Backup log directory" & vbCrLf & vbTab & _
« (drive:\path or \server\share\path). » & vbCrLf & vbCrLf & _
" * shutdown :: Shutdown (1) or Sleep (2) after execution." & vbCrLf & vbCrLf & _
" * command :: command line to executed after backup."
If WScript.Arguments.Count = 0 Then
WScript.Echo usageText
Exit Sub
End If
index = 0
Dim oneArg
For Each oneArg In WScript.Arguments
Select Case oneArg
Case « /s »: backupSrcList = WScript.Arguments(index + 1)
Case « /d »: backupDestList = WScript.Arguments(index + 1)
Case « /l »: logDir = WScript.Arguments(index + 1)
Case « /u »: shutdownAfterExec = CInt(WScript.Arguments(index + 1))
Case « /e »: cmdAfterBackup = WScript.Arguments(index + 1)
End Select
index = index + 1
Next
if len(backupSrcList) = 0 or len(backupDestList) = 0 or len(logDir) = 0 then
WScript.Echo usageText
Exit Sub
end if
if len(shutdownAfterExec) = 0 then shutdownAfterExec = 0
backupSrcList = Split(backupSrcList, « , »)
backupDestList = Split(backupDestList, « , »)
If UBound(backupSrcList) <> UBound(backupDestList) Then
WScript.Echo « Number of source directories differs from Number of destination directories. Exiting … »
Exit Sub
End If
index = 0
While index <= UBound(backupSrcList)
backupOneDir backupSrcList(index), backupDestList(index), logDir
index = index + 1
Wend
Dim objShell: Set objShell = CreateObject(« WScript.Shell »)
If Len(cmdAfterBackup) > 0 Then objShell.Run cmdAfterBackup
Dim shutdownCmd: shutdownCmd = « »
Select Case shutdownAfterExec
Case C_SHUTDOWN: shutdownCmd = C_SHUTDOWN_CMD
Case C_SLEEP: shutdownCmd = C_SLEEP_CMD
End Select
If Len(shutdownCmd) > 0 Then objShell.Run shutdownCmd
End Sub
'============================================================================
Sub backupOneDir(srcDir, destDir, logDir)
Dim fso: Set fso = CreateObject(« Scripting.FileSystemObject »)
If Not fso.FolderExists(destDir) Then fso.CreateFolder destDir
If Not fso.FolderExists(logDir) Then fso.CreateFolder logDir
Set fso = Nothing
Dim logfile, cmdLine, pID
logfile = logDir & "" & « bkp_ » & dirNameForLog(srcDir) & « _ » & dateToNumber(Date) & « .log »
'robocopy
cmdLine = C_BACKUPAPP & " " & srcDir & " " & destDir & " /LOG:" & logfile & " " & C_BACKUPAPP_PARAM
pID = LaunchProcess(cmdLine, Null)
waitForProcessEnd « », pID, C_TIMEPOLL, C_TIMEOUT
End Sub
'============================================================================
’ other functions
'============================================================================
Function dateToNumber(d)
dateToNumber = Year(d) & Right(« 0 » & Month(d), 2) & Right(« 0 » & Day(d), 2)
End Function
'============================================================================
Function dirNameForLog(directory)
Dim n: n = directory
n = Replace(n, « : », « »)
n = Replace(n, "", « _ »)
dirNameForLog = n
End Function
'============================================================================
Function LaunchProcess(program, path)
Dim processID
Dim WMImgmts: Set WMImgmts = GetObject(« WINMGMTS:{impersonationLevel=impersonate,(Security)}!\.\ROOT\CIMV2:Win32_Process »)
WMImgmts.Create program, path, Null, processID
Set WMImgmts = Nothing
LaunchProcess = processID
End Function
'============================================================================
Sub KillProcessID(processID)
Dim WMImgmts: Set WMImgmts = GetObject(« WINMGMTS:{impersonationLevel=impersonate,(Security)}!\.\ROOT\CIMV2 »)
Dim procList: Set procList = WMImgmts.execquery(« SELECT * FROM Win32_Process WHERE processid= » & processID)
Dim oneProc
For Each oneProc In procList
oneProc.Terminate
Next
Set procList = Nothing
Set WMImgmts = Nothing
End Sub
'============================================================================
Sub waitForProcessEnd(processName, processID, timepoll, timeout)
Dim query
If Len(processName) > 0 Then
query = « SELECT * FROM win32_process WHERE name=' » & processName & « ' »
ElseIf Len(processID) > 0 Then
query = « SELECT * FROM Win32_Process WHERE processid= » & processID
Else
Err.Raise 1, « waitForProcessEnd », « process name and process ID are missing »
End If
Dim totalTime: totalTime = 0
Dim WMImgmts, procList
Set WMImgmts = GetObject(« WINMGMTS:{impersonationLevel=impersonate,(Security)}!\.\ROOT\CIMV2 »)
Set procList = WMImgmts.execquery(query)
Do While procList.Count >= 1
WScript.sleep timepoll
totalTime = totalTime + timepoll
If totalTime >= timeout Then
Dim oneProc
For Each oneProc In procList
oneProc.Terminate
Next
End If
Set procList = WMImgmts.execquery(query)
Loop
Set procList = Nothing
Set WMImgmts = Nothing
End Sub[/code]]