Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.6 KiB

  1. rem norphtst trips c:echotest basefilename
  2. @echo off
  3. set replicatrees=D:\Replica-A\SERV01 E:\Replica-A\SERV02 F:\Replica-A\SERV03 G:\Replica-A\SERV04
  4. set replicatrees=%replicatrees% H:\Replica-A\SERV05 I:\Replica-A\SERV06 J:\Replica-A\SERV07 K:\Replica-A\SERV08
  5. pushd .
  6. set /a trips=%1
  7. set RPTFILE=c:foreachrs.rpt
  8. echo .-----------------------------------------------------------. >> %RPTFILE%
  9. echo . >> %RPTFILE%
  10. echo Command is %0 %* >> %RPTFILE%
  11. echo Test Started at %date% %time% >> %RPTFILE%
  12. rem m1 and m2 are two machines selected at random to receive the morphed file.
  13. FOR /L %%T IN (1,1,%trips%) DO (
  14. set /a m1=!random! %% 8 + 1
  15. set /a m2=!random! %% 8 + 1
  16. set /a num=0
  17. if !m1! GTR !m2! (
  18. set m1tag=WIN
  19. set m2tag=LOSE
  20. ) else (
  21. set m1tag=LOSE
  22. set m2tag=WIN
  23. )
  24. for %%x in (%replicatrees%) do (
  25. set /a num=num+1
  26. set targfile=%3_!m1!!m1!!m2!!m2!_%%T
  27. if !num! EQU !m1! (
  28. call %2 "!m1tag!_%%T__!num!!num!!num!!num!_!date!__!time!" %%x\!targfile! %*
  29. sleep 1
  30. )
  31. if !num! EQU !m2! (
  32. call %2 "!m2tag!_%%T__!num!!num!!num!!num!_!date!__!time!" %%x\!targfile! %*
  33. sleep 1
  34. )
  35. )
  36. sleep 3
  37. )
  38. popd
  39. echo Test Ended at !date! !time! >> %RPTFILE%
  40. echo . >> %RPTFILE%