Dear lee123
I have already given clue to same problem in some forum (which I don't remember at present).
First of all about your program taking too long to complete:
You have unneccessarily used For..Next loop, in this loop u have used copying of folder which is being copied 100 times again & again and Progress bar is increasing 1 to 100 simply showing that how many times folders is copied.
Now I just give u an idea (of course I will try a program and will post it here):
First, u read the number of files in the folder to be copied (say it is SFolder) and create a Destination folder (may be DFolder). Set max value of PBar to number of files in SFolder. Now copy all the files (using a loop) one by one from SFolder to DFolder and increase the value of PBar to number of files copied.
Second, read total number of bytes in SFolder, set max value of PBar to it. Copy files one by one and increase value of PBar as number of bytes copied increases.
Hope it will give an idea and help u.
I have already given clue to same problem in some forum (which I don't remember at present).
First of all about your program taking too long to complete:
You have unneccessarily used For..Next loop, in this loop u have used copying of folder which is being copied 100 times again & again and Progress bar is increasing 1 to 100 simply showing that how many times folders is copied.
Now I just give u an idea (of course I will try a program and will post it here):
First, u read the number of files in the folder to be copied (say it is SFolder) and create a Destination folder (may be DFolder). Set max value of PBar to number of files in SFolder. Now copy all the files (using a loop) one by one from SFolder to DFolder and increase the value of PBar to number of files copied.
Second, read total number of bytes in SFolder, set max value of PBar to it. Copy files one by one and increase value of PBar as number of bytes copied increases.
Hope it will give an idea and help u.
Comment