Source code of Windows XP (NT5)
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.

29 lines
866 B

  1. $newjob = `drizzlecli.exe /rawreturn /create TestGroup`;
  2. `drizzlecli.exe /addfile $newjob http://aptest/scratch/sudheer/dload/big1.txt c:\\temp\\big1.txt`;
  3. `drizzlecli.exe /resume $newjob`;
  4. while(1) {
  5. $jobstate = `drizzlecli.exe /rawreturn /getstate $newjob`;
  6. if ( $jobstate eq "ERROR")
  7. {
  8. print("Job hit an error\n");
  9. $errormsg = `drizzlecli.exe /geterror $newjob`;
  10. `drizzlecli.exe /cancel $newjob`;
  11. die($errormsg);
  12. }
  13. elsif ( $jobstate eq "TRANSFERRED" )
  14. {
  15. print("Job transferred, completing...\n");
  16. `drizzlecli.exe /complete $newjob`;
  17. print("Job transferred.");
  18. exit(0);
  19. }
  20. $bytestransfered = `drizzlecli.exe /rawreturn /getbytestransfered $newjob`;
  21. $bytestotal = `drizzlecli.exe /rawreturn /getbytestotal $newjob`;
  22. print( "$jobstate $bytestransfered / $bytestotal\n" );
  23. sleep( 5 );
  24. }