Sign in to follow this  
Followers 0
GAM

Status of file copy

5 posts in this topic

Hi. How can I know the status of a file copy. I mean I would like to whether the file is copied or the file is being copied? Help please.


Neil

Share this post


Link to post
Share on other sites



Hi. How can I know the status of a file copy. I mean I would like to whether the file is copied or the file is being copied? Help please.

It seems to be possible to get status by having a constantly looping script monitor the file size of the original file, and then compare it to the origin file.

An example of how you would get the progress bar to show this would be:

$ProgressBar = GUICtrlCreateProgress(DIMENSIONSGOEHERE)

$OldFilesize = FileGetSize(INSERTORIGINFILEPATHHERE)

While 1

$NewFileSize = FileGetSize(INSERTDESTINATIONFILEPATHHERE)

$PercentDone = $NewFileSize / $OldFileSize * 100

GUIctrlSetData(CONTROLID,$PercentDone)

If $PercentDone = 100 then

Exitloop

endif

wend

Not sure if this is what you mean, but it may not work and may need a little modifying, as I am very drowsy at the moment. you may have to stick calls to functions needed to run while copying in the While Loop.

IMPORTANT, READ THE SCRIPT AND MODIFY AS NEEDED, DO NOT COPY AND PASTE IT WILL NOT WORK

Share this post


Link to post
Share on other sites

... script monitor the file size of the original file, and then compare it to the origin file....

Sorry, I Meant to Put:

"script monitor the file size of the Destination file, and then compare it to the origin file"

Share this post


Link to post
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
Sign in to follow this  
Followers 0