Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1632 connectés 

  FORUM HardWare.fr
  Systèmes & Réseaux Pro
  Infrastructures serveurs

  Problème script robocopy

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Problème script robocopy

n°104835
tompouss
Petit chat
Posté le 09-01-2013 à 10:28:01  profilanswer
 

Bonjour,
 
j'ai plusieurs scripts robocopy qui se lancent un backup de dossiers d'un server OVH vers un NAS dans notre immeuble
 
j'ai un autre script VBS qui permet d'envoyer le log généré par mail en signalant des erreurs de copies
 
enfin il est sensé le faire mais c'est foireux: genre il me dit parfois ok meme si le backup ne s'est pas terminé correctement
 
le probleme c'est que je ne sais pas trop quoi tester et que j'aimerais surtout des précisions sur les erreurs en questions
 

Code :
  1. Dim txtSMTPServer, txtTo, txtFrom, txtSubject, txtBody, txtSMTPPort
  2.     Dim txtLog, strValue, iTotal, iPos, strText
  3.                
  4. txtLog = "C:\*****\robocopy\********.txt" 'chemin du fichier de log de robocopy
  5.  'gestion des erreurs de copie
  6. strText = GetFile(txtLog)
  7.     iPos = 1
  8.     Do While iPos <= Len(strText)
  9.        If InStr(iPos, UCase(strText), "0X00000" ) > 0 Then
  10.            iTotal = iTotal + 1
  11.                 iPos = InStr(iPos, UCase(strText), "0X00000" )_
  12.                 + Len("0X00000" )
  13.             Else
  14.                 Exit Do
  15.             End If
  16.     Loop
  17.     '-- --
  18.  
  19.     If iTotal > 0 Then
  20.        strErrors = 1
  21.     Else
  22.        strErrors = 0
  23.     End If
  24. 'preparation du mail
  25.                
  26.     Set sendmail = CreateObject("CDO.Message" )
  27.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing" ) = 1
  28.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver" ) = "127.0.0.1"
  29.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport" ) = 25
  30.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendemailaddress" ) = "help@******.be"
  31.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" ) = 0
  32.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername" ) = "my@gmail.com"
  33.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword" ) = "password"
  34.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl" ) = true
  35.                
  36.     sendmail.Configuration.Fields.Update
  37.                
  38.     sendmail.From = "help@*****.be"
  39.     sendmail.To = "***@******.be"
  40.     sendmail.Subject = "  BACKUP status"
  41.     If strErrors = 1 Then
  42.  sendmail.Textbody = "Your Robocopy Backup Job has completed with one or more errors - attached file has details."
  43.     else
  44.  sendmail.Textbody = "Your Robocopy Backup Job has successfully completed - attached file has details"
  45.     End If
  46.    
  47. sendmail.AddAttachment "C:\*****\robocopy\BACKUPMERCATORS.txt"
  48. 'Envoi du mail
  49. sendmail.Send
  50.    
  51. 'lecture du log
  52. function GetFile(txtLog)
  53.       If txtLog<>"" Then
  54.         Dim FS, FileStream
  55.         Set FS = CreateObject("Scripting.FileSystemObject" )
  56.           on error resume Next
  57.           Set FileStream = FS.OpenTextFile(txtLog)
  58.           GetFile = FileStream.ReadAll
  59.       End If
  60.     End Function


 
 

mood
Publicité
Posté le 09-01-2013 à 10:28:01  profilanswer
 

n°104836
tompouss
Petit chat
Posté le 09-01-2013 à 10:39:57  profilanswer
 

le script "amélioré"
 

Code :
  1. Dim txtSMTPServer, txtPort, txtTo, txtFrom, txtSubject, txtBodyOk, txtBodyFailure, txtLog, strValue, iTotal, iPos, strText
  2. '''''' A personnaliser ''''''''''''''''''''''''''''
  3.     txtSMTPServer = "***************"
  4.     txtPort = 25
  5.     txtTo = "*****@***************"
  6.     txtFrom = "*****@***************"
  7.     txtSubject = "test"
  8.     txtBodyOk = "Your Robocopy Backup Job was successfully completed - attached file has details. "
  9.     txtBodyFailure = "Your Robocopy Backup Job has completed with one or more errors. "
  10.     txtLog = "C:********robocopySQLBACKUPS.txt" 'chemin d'acces vers le log
  11.    
  12.                
  13.      'gestion des erreurs robocopy
  14.     strText = GetFile(txtLog)
  15.     iPos = 1
  16.     Do While iPos <= Len(strText)
  17.        If InStr(iPos, UCase(strText), "0X00000" ) > 0 Then
  18.            iTotal = iTotal + 1
  19.                 iPos = InStr(iPos, UCase(strText), "0X00000" )_
  20.                 + Len("0X00000" )
  21.                 msgbox(iPos)
  22.             Else
  23.                 Exit Do
  24.             End If
  25.     Loop
  26.     '-- --
  27.    
  28.    
  29.  
  30.     If iTotal > 1 Then
  31.        strErrors = 1
  32.     Else
  33.        strErrors = 0
  34.     End If
  35.    
  36.     'preparation du mail
  37.            
  38.     Set sendmail = CreateObject("CDO.Message" )
  39.     'sendusing permet d'expliciter la facon d'envoyer le mail
  40.     ' la valeur 2 utilise un client pour l'envoi du mail, il faut donc qu'il y en ai 1 d'installé et configuré
  41.     'la valeur 1 utilise le service smtp du server local (ou d'un server distant)
  42.     'http://msdn.microsoft.com/en-us/library/exchange/ms873037%28v=exchg.65%29.aspx
  43.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing" ) = 2
  44.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver" ) = txtSMTPServer
  45.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport" ) = txtPort
  46.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendemailaddress" ) = txtFrom
  47.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" ) = 0
  48.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername" ) = "my@gmail.com"
  49.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword" ) = "password"
  50.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl" ) = false
  51.                
  52.     sendmail.Configuration.Fields.Update
  53.                
  54.     sendmail.From = txtFrom
  55.     sendmail.To = txtTo
  56.     sendmail.Subject = txtSubject
  57.     If strErrors = 1 Then
  58.         sendmail.Textbody = txtBodyFailure & vbNewline & "Errors :"& iTotal &"Error message :" & vbcrlf & errorMessage(iPos)
  59.    
  60.     else
  61.         sendmail.Textbody = txtBodyOk
  62.        
  63.     End If
  64.     'on joint le log en attache
  65.     sendmail.AddAttachment txtLog
  66.    
  67.     'Envoi du mail
  68.     sendmail.Send
  69.    
  70.     'lecture du log
  71.     function GetFile(txtLog)
  72.       If txtLog<>"" Then
  73.         Dim FS, FileStream
  74.         Set FS = CreateObject("Scripting.FileSystemObject" )
  75.           on error resume Next
  76.           Set FileStream = FS.OpenTextFile(txtLog)
  77.           GetFile = FileStream.ReadAll
  78.       End If
  79.     End Function
  80.    
  81.     'gestion des erreurs
  82.     function errorMessage(iTotal)
  83.    
  84.         if (iTotal >= 0 AND iTotal <= 16 ) Then
  85.             Select Case iTotal
  86.                 Case 0
  87.                     errorMessage = "No errors occurred, and no copying was done. The source and destination directory trees are completely synchronized. "
  88.                 Case 1
  89.                     errorMessage = "One or more files were copied successfully (that is, new files have arrived)."
  90.                 Case 2
  91.                     errorMessage = "Some Extra files or directories were detected. Examine the output log for details. "
  92.                 Case 3
  93.                     errorMessage = "Certains fichiers ont été copiés. Fichiers supplémentaires étaient présents. Aucune erreur ne s'est produite."
  94.                 Case 4
  95.                     errorMessage = "Some Mismatched files or directories were detected. Examine the output log. Some housekeeping may be needed."
  96.                 Case 5
  97.                     errorMessage = "Certains fichiers ont été copiés. Une discordance entre certains fichiers. Aucune erreur s'est produite."
  98.                 Case 6
  99.                     errorMessage = "Il existe des fichiers supplémentaires et des fichiers qui ne correspondent pas. Pas de fichiers ont été copiés et aucune panne ne s'est produites. Cela signifie que les fichiers existent déjà dans le répertoire de destination."
  100.                 Case 7
  101.                     errorMessage = "Les fichiers ont été copiés, une incompatibilité de fichier était présente et des fichiers supplémentaires étaient présents."
  102.                 Case 8
  103.                     errorMessage = "Some files or directories could not be copied (copy errors occurred and the retry limit was exceeded).Check these errors further."
  104.                 Case 16
  105.                     errorMessage = "Serious error. Robocopy did not copy any files. Either a usage error or an error due to insufficient access privileges on the source or destination directories."
  106.             End Select
  107.         else
  108.             errorMessage= "Erreur non gérée, merci de consulter le log"
  109.         end if
  110.     End Function


---------------
collectionneur de pâtes thermiques
n°104837
couak
Posté le 09-01-2013 à 10:42:12  profilanswer
 

il faut se baser sur le code retour http://ss64.com/nt/robocopy-exit.html

n°104839
Je@nb
Modérateur
Kindly give dime
Posté le 09-01-2013 à 11:18:57  profilanswer
 

:jap: ne parse pas le fichier de log, le code retour de robocopy est suffisament clair pour te donner ces infos

n°104941
tompouss
Petit chat
Posté le 11-01-2013 à 11:29:03  profilanswer
 

l'error level est récupérée comme ceci:
 
ROBOCOPY %_source% %_dest% %_what% %_options%
if errorlevel 0 echo %errorlevel% >C:\******\robocopy\errorlevelmercator.txt
 
 
 
le script vbs remanié:
 

Code :
  1. 'Ce script permet de parser un log robocopy pour detecter les erreurs de copies et d'envoyer le log par mail avec une alerte
  2. Dim txtSMTPServer, txtPort, txtTo, txtFrom, txtSubject, txtBodyOk, txtBodyFailure, txtLog, strValue, iTotal, iPos, strText
  3. '''''' A personnaliser ''''''''''''''''''''''''''''
  4.     txtSMTPServer = "127.0.0.1"
  5. txtPort = 24
  6. txtTo = "***@***.be"
  7. txtFrom = "**@***.be"
  8. txtSubject = "*** SQL backup status"
  9. txtBodyOk = "Your Robocopy Backup Job was successfully completed - attached file has details. & vbNewline" 
  10. txtBodyFailure = "Your Robocopy Backup Job has completed with one or more errors - attached file has details. & vbNewline" 
  11.     txtLog = "C:\***\robocopy\SQLBACKUPS.txt" 'chemin d'acces vers le log
  12.     txtErrorLevel = "C:\****\robocopy\errorlevelsql.txt"
  13.                
  14.  'gestion des erreurs robocopy
  15. ' strText = GetFile(txtLog)
  16. '   iPos = 1
  17.   '  Do While iPos <= Len(strText)
  18.    '    If InStr(iPos, UCase(strText), "0X00000" ) > 0 Then
  19.     '       iTotal = iTotal + 1
  20.      '           iPos = InStr(iPos, UCase(strText), "0X00000" )_
  21.       '          + Len("0X00000" )
  22.        '     Else
  23.         '        Exit Do
  24.          '   End If
  25.     'Loop
  26. strErrorlevel = GetFile(txtErrorLevel)
  27.     '-- --
  28.  
  29. 'preparation du mail
  30.            
  31.     Set sendmail = CreateObject("CDO.Message" )
  32. 'sendusing permet d'expliciter la facon d'envoyer le mail
  33. ' la valeur 2 utilise un client pour l'envoi du mail, il faut donc qu'il y en ai 1 d'installé et configuré
  34. 'la valeur 1 utilise le service smtp du server local (ou d'un server distant)
  35. 'http://msdn.microsoft.com/en-us/library/exchange/ms873037%28v=exchg.65%29.aspx
  36.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing" ) = 1
  37.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver" ) = txtSMTPServer
  38.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport" ) = txtPort
  39.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendemailaddress" ) = txtFrom
  40.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" ) = 0
  41.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername" ) = "my@gmail.com"
  42.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword" ) = "password"
  43.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl" ) = false
  44.                
  45.     sendmail.Configuration.Fields.Update
  46.                
  47.     sendmail.From = txtFrom
  48.     sendmail.To = txtTo
  49.     sendmail.Subject = txtSubject
  50.    
  51. If strErrorlevel <= 3 Then
  52.  sendmail.Textbody = txtBodyOk  &  errorMessage(strErrorlevel) & vbNewline & "( Error level " & strErrorlevel &" )"
  53. else
  54.  sendmail.Textbody = txtBodyFailure &  errorMessage(strErrorlevel) & vbNewline & "( Error level " & strErrorlevel &" )"
  55.     End If
  56. 'on joint le log en attache
  57. sendmail.AddAttachment txtLog
  58.    
  59. 'Envoi du mail
  60. sendmail.Send
  61.    
  62. 'lecture du log
  63. function GetFile(txtLog)
  64.       If txtLog<>"" Then
  65.         Dim FS, FileStream
  66.         Set FS = CreateObject("Scripting.FileSystemObject" )
  67.           on error resume Next
  68.           Set FileStream = FS.OpenTextFile(txtLog)
  69.           GetFile = FileStream.ReadAll
  70.       End If
  71.     End Function
  72. function errorMessage(txtErrorLevel)
  73.  
  74.         if (txtErrorLevel >= 0 AND txtErrorLevel <= 16 ) Then
  75.             Select Case txtErrorLevel
  76.                 Case 0
  77.                     errorMessage = "No errors occurred, and no copying was done. The source and destination directory trees are completely synchronized. "
  78.                 Case 1
  79.                     errorMessage = "One or more files were copied successfully (that is, new files have arrived)."
  80.                 Case 2
  81.                     errorMessage = "Some Extra files or directories were detected. Examine the output log for details. "
  82.                 Case 3
  83.                     errorMessage = "Certains fichiers ont été copiés. Des files supplémentaires étaient présents. Aucune erreur ne s'est produite."
  84.                 Case 4
  85.                     errorMessage = "Some Mismatched files or directories were detected. Examine the output log. Some housekeeping may be needed."
  86.              
  87.                 Case 6
  88.                     errorMessage = "Il existe des fichiers supplémentaires et des fichiers qui ne correspondent pas. Aucun fichiers copiés et aucunr erreur apparue. Cela signifie que les fichiers existent déjà dans le répertoire de destination."
  89.                 Case 7
  90.                     errorMessage = "Les fichiers ont été copiés, une incompatibilité de fichier était présente et des fichiers supplémentaires étaient présents."
  91.                 Case 8
  92.                     errorMessage = "Some files or directories could not be copied (copy errors occurred and the retry limit was exceeded).Check these errors further."
  93.                 Case 16
  94.                     errorMessage = "Serious error. Robocopy did not copy any files. Either a usage error or an error due to insufficient access privileges on the source or destination directories."
  95.             End Select
  96.         else
  97.             errorMessage= "Unknow Error, please read the log"
  98.         end if
  99.     End Function


 
Mise à part des problemes de saut de ligne dans le body du mail ca fonctionne
Vous auriez des idées pour améliorer la gestion des erreur ?


Message édité par tompouss le 11-01-2013 à 11:29:29

---------------
collectionneur de pâtes thermiques
n°104942
Je@nb
Modérateur
Kindly give dime
Posté le 11-01-2013 à 11:36:11  profilanswer
 

Les codes d'erreurs sont un masque binaire, là tu les catches pas tous.
 
Et tu te fais chier pour rien à lancer robocopy puis récuperer le code erreur en le mettant dnas un fichier alors qu'en 1 ligne de vbs tu as tout

n°104952
tompouss
Petit chat
Posté le 11-01-2013 à 13:52:51  profilanswer
 

Ok je vois ce que je dois faire  
merci pour ton aide :)


---------------
collectionneur de pâtes thermiques
n°104953
tompouss
Petit chat
Posté le 11-01-2013 à 14:21:48  profilanswer
 

quand tu dis que les codes erreurs sont un masque binaire, ca veut dire que je suis sensé catcher une valeur comme celle ci: 0×10 ?
Or il me retourne un int
il fait la conversion auto en décimal ou quoi?


---------------
collectionneur de pâtes thermiques
n°104954
Je@nb
Modérateur
Kindly give dime
Posté le 11-01-2013 à 14:30:09  profilanswer
 

un nombre que tu l'ai en décimale ou en hexa ça change rien c'est un nombre.
 
Qd je dis que c'est un masque c'est que si l'erreur est 7, c'est que c'est 4 + 2 + 1 donc l'erreur 4 2 et 1, si c'est 12, c'est 8+4 etc. Le lien donné plus haut te l'explique

n°104956
tompouss
Petit chat
Posté le 11-01-2013 à 14:57:32  profilanswer
 

ok je viens de tilter


---------------
collectionneur de pâtes thermiques
mood
Publicité
Posté le 11-01-2013 à 14:57:32  profilanswer
 

n°105552
tompouss
Petit chat
Posté le 24-01-2013 à 17:24:07  profilanswer
 

Mieux comme ca  :)  
 
J'ai quand meme eu un errorlevel 0 sur un backup où il ya eu des changements
 
Je pense que ce serait mieux de reinitialiser la variable errorlevel à la fin du job
 
 
 

Code :
  1. 'Ce script permet de catcher l'error-level généré suite à un job robocopy pour detecter les erreurs de copies et d'envoyer le log par mail avec une alerte
  2. Dim Jobname, txtSMTPServer, txtPort, txtTo, txtFrom, txtSubject, txtBodyOk, txtBodyFailure, txtLog, strValue, iTotal, iPos, strText
  3. Set WshShell = CreateObject("WScript.Shell" )
  4. '''''' A personnaliser ''''''''''''''''''''''''''''
  5. Jobname = "*****"
  6.     txtSMTPServer = "******l"
  7. txtPort = 24
  8. txtTo = "it@******.be"
  9. txtFrom = "help@********.be"
  10. txtSubject = "*********
  11.  txtBodyOk = "Your Robocopy Backup Job was successfully completed - attached file has detail" & vbLf
  12. txtBodyFailure = "Your Robocopy Backup Job has completed with one or more errors - attached file has details."& vbLf
  13.     txtLog = "C:\********\robocopy\BACKUPMERCATORS.txt" 'chemin d'acces vers le log
  14.     'txtErrorLevel = "C:\*********\robocopy\errorlevelmercator.txt"
  15. errorlevel = WshShell.Run( Jobname, 0, true)
  16.                
  17.  'gestion des erreurs robocopy
  18. 'strText = GetFile(txtLog)
  19.     'iPos = 1
  20.    ' Do While iPos <= Len(strText)
  21.     '   If InStr(iPos, UCase(strText), "0X00000" ) > 0 Then
  22.      '      iTotal = iTotal + 1
  23.      '           iPos = InStr(iPos, UCase(strText), "0X00000" )_
  24.      '           + Len("0X00000" )
  25.       '      Else
  26.       '          Exit Do
  27.        '     End If
  28.     'Loop
  29. 'strErrorlevel = GetFile(txtErrorLevel)
  30.     '-- --
  31.  
  32.  
  33. 'preparation du mail
  34.            
  35.     Set sendmail = CreateObject("CDO.Message" )
  36. 'sendusing permet d'expliciter la facon d'envoyer le mail
  37. ' la valeur 2 utilise un client pour l'envoi du mail, il faut donc qu'il y en ai 1 d'installé et configuré
  38. 'la valeur 1 utilise le service smtp du server local (ou d'un server distant)
  39. 'http://msdn.microsoft.com/en-us/library/exchange/ms873037%28v=exchg.65%29.aspx
  40.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing" ) = 1
  41.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver" ) = txtSMTPServer
  42.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport" ) = txtPort
  43.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendemailaddress" ) = txtFrom
  44.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" ) = 0
  45.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername" ) = "my@gmail.com"
  46.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword" ) = "password"
  47.     sendmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl" ) = false
  48.                
  49.     sendmail.Configuration.Fields.Update
  50.                
  51.     sendmail.From = txtFrom
  52.     sendmail.To = txtTo
  53.     sendmail.Subject = txtSubject
  54.    
  55. If errorlevel <= 3 Then
  56.  if errorlevel = -1 Then
  57.   sendmail.Textbody = "No error-level catched, check log"
  58.  else
  59.   sendmail.Textbody = txtBodyOk & " Error-level "&errorlevel & vbLf &"Error details = " & errorMessage(errorlevel)
  60.  end if
  61. else
  62.  sendmail.Textbody = txtBodyFailure & " Error-level :"&errorlevel & vbLf &"Error details = " & errorMessage(errorlevel)
  63.     End If
  64. 'on joint le log en attache
  65. sendmail.AddAttachment txtLog
  66.    
  67. 'Envoi du mail
  68. sendmail.Send
  69. function errorMessage(errorlevel)
  70.  
  71.         if (errorlevel >= 0 AND errorlevel <= 16 ) Then
  72.             Select Case errorlevel
  73.                 Case 0
  74.                     errorMessage = "No change: No errors occurred, and no copying was done. The source and destination directory trees are completely synchronized. "
  75.                 Case 1
  76.                     errorMessage = "One or more files were copied successfully (that is, new files have arrived)."
  77.                 Case 2
  78.                     errorMessage = "Some Extra files or directories were detected. Examine the output log for details."
  79.                 Case 3
  80.                     errorMessage = "One or more files were copied successfully (that is, new files have arrived). Some Extra files or directories were detected. Examine the output log for details."
  81.                  
  82.                 Case 4
  83.                     errorMessage = "Some Mismatched files or directories were detected. Examine the output log. Some housekeeping may be needed."
  84.                 Case 5
  85.     errorMessage = "OKCOPY + MISMATCHES"
  86.    Case 6
  87.     errorMessage = "MISMATCHES + XTRA"
  88.    Case 7
  89.     errorMessage = "OKCOPY + MISMATCHES + XTRA"
  90.    Case 8
  91.     errorMessage = " Some files or directories could not be copied (copy errors occurred and the retry limit was exceeded) Check these errors further."
  92.    Case 9
  93.     errorMessage = "One or more files were copied successfully but Some files or directories could not be copie (copy errors occurred and the retry limit was exceeded).   Check these errors further."
  94.                 Case 10
  95.     errorMessage = "FAIL + XTRA"
  96.    Case 11
  97.                     errorMessage = "OKCOPY + FAIL + XTRA"
  98.                 Case 12
  99.                     errorMessage = "FAIL + MISMATCHES"
  100.                 Case 13
  101.                     errorMessage = "OKCOPY + FAIL + MISMATCHES"
  102.    Case 14
  103.     errorMessage = "FAIL + MISMATCHES + XTRA"
  104.    Case 15
  105.     errorMessage = "OKCOPY + FAIL + MISMATCHES + XTRA"
  106.                 Case 16
  107.                     errorMessage = "Serious error. Robocopy did not copy any files. Either a usage error or an error due to insufficient access privileges on the source or destination directories."
  108.             End Select
  109.         else
  110.             errorMessage= "Unknow Error, please read the log"
  111.         end if
  112.     End Function


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Systèmes & Réseaux Pro
  Infrastructures serveurs

  Problème script robocopy

 

Sujets relatifs
Problème NAS Lacie 2big 4 TéraIPCOP problème "No CD ROM Not Found"
Problème VPN Ipsec Orange > Orange [RESOLU] [RESOLU]Problème d'accès internet client - Windows 2008 R2
Exchange 2010 problème time et databaseproblème réseaux pour créer un envirronnement cli/serveur
Probleme snort configurationprobleme script redémarrage server
probléme de connexion entre radius et ldap 
Plus de sujets relatifs à : Problème script robocopy


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR