Sign in to follow this  
Followers 0
mobster

progress bar

5 posts in this topic

#1 ·  Posted (edited)

Hi

I am looking for a progress bar that will be working during a single file copy ,I have searched the forum and couldent find any thing for my code

here is the code :

Local $source = "C:\Users\esason\Desktop\Linux\RH4.4\rh44-yum-client-disk1.vmdk"

Local $destanation = "C:\test"

copy($source,$destanation)

func copy($source ,$destanation )

ProgressOn("Progress Meter", "Increments every second", "0 percent")

;if FileExists($destanation) then ProgressSet(100 , "Done", "Complete")

For $i = 10 to 100 step 1

sleep(2000)

ProgressSet( $i, $i & " percent")

Next

FileCopy($source ,$destanation,9)

if FileExists($destanation) then ProgressSet(100 , "Done", "Complete")

sleep(500)

ProgressOff()

EndFunc

which doesent display the copy proccess accurately

Can any one help

Thanks :x

Edited by mobster

Share this post


Link to post
Share on other sites



Is it possible that Windows gives no progress feedback on a single file copy? So how can any copy function show progress? What if you read the size of the source file, fire off the copy as a separate thread or process, then monitor the size of the copied file?

Richard.

Share this post


Link to post
Share on other sites

Maybe this would help ->

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

You can write your own function to read data from source file in chunks and write in destination file. This progress can be shown on a progress bar control even for a single file.


When the words fail... music speaks

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