Jump to content

Measure progress by MB's


stev379
 Share

Recommended Posts

I have a script now that will copy what I want and run the Windows prog bar while copying files...works great.

What I'd like to do is remove the Window prog bar and just use AutoIT, by getting the directory size of the source directory then polling the size of the destination directory in a loop. This will apply to different size source directories pretty much each time it's used.

extremely streamlined Ex:

Global $src_SIZE = DirGetSize($src_DIR)
$mb_SRC = Round($src_SIZE / 1024 / 1024)
$Copy = Dircopy($src_DIR, $Backup & "\" & $dest_DIR, 1)

Say the sourcedir = 17 MB's

I'd like the progbar to make 17 the 100% value --> $progress = $src_SIZE * 100 / $dest_SIZE <--???

Problem of course is how to continue polling the destination once dircopy starts??...and send that to a progress bar, without creating a seperate script.

I figured I'd ask if this is even possible, before I spend too much time going in the wrong direction.

Thanks for any help or suggestions!!

Link to comment
Share on other sites

I have a script now that will copy what I want and run the Windows prog bar while copying files...works great.

What I'd like to do is remove the Window prog bar and just use AutoIT, by getting the directory size of the source directory then polling the size of the destination directory in a loop. This will apply to different size source directories pretty much each time it's used.

extremely streamlined Ex:

Global $src_SIZE = DirGetSize($src_DIR)
$mb_SRC = Round($src_SIZE / 1024 / 1024)
$Copy = Dircopy($src_DIR, $Backup & "\" & $dest_DIR, 1)

Say the sourcedir = 17 MB's

I'd like the progbar to make 17 the 100% value --> $progress = $src_SIZE * 100 / $dest_SIZE <--???

Problem of course is how to continue polling the destination once dircopy starts??...and send that to a progress bar, without creating a seperate script.

I figured I'd ask if this is even possible, before I spend too much time going in the wrong direction.

Thanks for any help or suggestions!!

Do a search on the forum for "progress". I am sure I remember something similar a while back.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Do a search on the forum for "progress". I am sure I remember something similar a while back.

I've been searching off and on throughout the day, but I'm either not understanding what I'm reading or it's not pertaining to what I need. I thought I found something close once, but it was more for counting files and running the prog bar with that value rather than actual size. Since the folders I'll need to copy will have multiple subdirectories of greatly varying sizes, I figured a size count would be more appropriate. I'll keep searching though.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...