Jump to content

Status of file copy


GAM
 Share

Recommended Posts

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

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...