Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating Progress Bar During a File Copy Operation
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00145262
Message ID:
00145474
Views:
31
>I would like to know what information to use to increment my progress bar
>while I'm copying a file. I'm working on an application launcher program that
>automatically downloads a new copy of the application .exe if a newer one
>exists. I would like to give the user some way to guage the progress. Thanx

The problem with this is the copy command is running in the only thread - there is nowhere to stand off to the side and track the progress. If the EXE is large, I suppose before you run the copy command you could launch another program that would look at how close to the size of the exe being copied the local copy was, with a timer and checking the filesize. To me this seems rather awkward. If you were writing a low level routine to copy the exe byte by byte you could look at progress, but again I think this is rather cumbersome unless it is one monster exe. I would test to see how long it takes to download on average, and give a window saying "Please wait 20 seconds while a new copy of your application is downloaded" or something, with an hourglass so they know something is going on...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform