Jump to content

Matt Houston

Members
  • Posts

    8
  • Joined

  • Last visited

Matt Houston's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Ooops... Have to read more about the syntax... Sure - robocopy.exe is attached to this post. I think that's ok, as Microsoft is distributing this freely. I don't think that it is important to use the same files which i've been using. I just picked some random files (i always took one larger file (200 MB), because otherwise the script does not run long enough). Greetings, MattHouston robocopy.zip
  2. Thanks for your help mates! Sorry that i could not get back earlier... (way too much work these days...) @neogia: i just had a quick go on your script - unfortunately it did not work (at least my part...) i tried to build a prograssbar around it - with no success. if i understood the concept i need to create the progressbar *BEFORE* the loop starts, the update should then be done inside the loop, right? ... If IsArray($result) Then If StringInStr($result[0], "%") Then; Current line is a progress update line $progress = StringTrimRight($result[0], 1) MsgBox (4096,"Test", $progress) ... I just used a message box in order to see if this part is running - i also tried to update a progressbar at this point. One small thing - on line number three your script says: $output &= StdoutRead($copyjob)Is the "&" a typo? @simucal: Your script is working - for one file. As soon, as there are some more files in the folder it struggles and the progressbar is no longer updated. Unfortunately i don't have the time to investigate all this at the moment. My boss gave me some high priority tasks - so i will get back to this in about 2 weeks. But at least i wanted to thank you for your support! I learned a lot in this forum and i'm sure we will get this working too! So long! Matt Houston
  3. If i understand the picture correctly it's just about 3->5, 6->2... and not 3->5->6->2->5...! So no number is allowed as "starting point" more than once... But that sounds too easy... Look what i mean: Working example: 3 5 6 2 5 2 1 5 4 2 7 2 This would be 6 pairs: (3->5, 6->2, 5->2, 1->5, 4->2, 7->2) Non-Working example: 1 2 5 6 2 3 6 3 4 5 2 4 4 6 This would be 7 pairs: (1->2, 5->6, 2->3, 6->3, 4->5, 2->4, 4->6) So on the red and on the orange position we have the errors, because the same number is used twice. So you would only need to check if a number is on the first spot more than once... If missed something here - please don't blame me... It's been a really long working day for me - just ignore me then... BTW: What kind of game could that be? MattHouston
  4. neogia - thanks for your help! I didn't even know ClipPut So here's what i got: 4.2 m c:\copytest\filename1.xls 0% 1% 2% 4% 5% 7% 8% 10% 11% ........ 94% 96% 97% 99% 100% 53248 c:\copytest\filename2.EXE 0% 100% 147654 c:\copytest\filename3.bmp 0% 44% 88% 100%I just shortened it a bit in the middle - no need to watch all those numbers... I would like to use these three values (percentage, filesize and filename) to make a progress bar / progress window. I will definately read your guide - but i'm unsure if i find the time today. Again, thank you very much for your help! I really appreciate that! Matt
  5. Hi, I would like to combine my script with robocopy in order to get some (per-file) percentage values. Basically it's working but i'm stuck with parsing the data. Here's my code so far (not much indeed...): #include <constants.au3> $sourcedir = "c:\copytest\" $destdir = "c:\copytest2\" $copyjob = Run (@ComSpec & " /c " & 'robocopy.exe ' & $sourcedir & ' ' & $destdir & ' /E /NJH /NJS /NDL /NC', @ScriptDir, @SW_HIDE, $STDOUT_CHILD) While 1 $line = StdoutRead($copyjob) If @error = -1 Then ExitLoop MsgBox(0, "STDOUT read:", $line) Wend I just used a message box to see if anything is read by StoudRead - that's working! The message box is FULL of info! At the moment the fetched data looks like this: filesize filename.exe 1% 2% 4% 6% 7% 8% .... My question is: Is it possible to "StdoutRead-line-by-line"? Is there some way to parse the info? My idea was to get this line by line and parse it in order to get the single values (this is the actual output from robocopy in the cmd box): 100% 4.2 m c:\copytest\file1.xls 100% 53248 c:\copytest\file2.exe 100% 52 c:\copytest\file3.ini Maybe somebody as a few hints to get me back on track... Greetings, MattHouston
  6. Cool! Good to know! Thanks JdeB!
  7. Hi, same error messages here - but it's working fine! Getting the message box with the crypted string I'm using the _StringEncrypt in another script which has been written with another editor (without au3check) - so i never knew about the errors. I just loaded the "old" script into SciTE - and received the same errors. As my script is working fine though - i think i will forget about it! Bye, Lars
  8. Hi Everyone, has somebody tried to use robocopy in order to produce a progressbar? I tried to use it in combination with StdoutRead which is working fine - but i don't have any idea how to parse the captured stuff. Is it possible to "StdoutRead line by line"? Greetings! MattHouston
×
×
  • Create New...