As we all know there could be no correct progress bar if the files are not counted before the operation.
But IMO everything is better then nothing.
I would suggest the following 2 models to workaround the unknown data. I will only refer to copy operations in the suggestions. (should be straight forward for other operations.)
A) Assumption: the copied folders are nearly the same size
Count the first level folders of the copy progress and assign them an equal part of the 100% progress.
If the part of a folder is bigger than 1% then the part is divided again for the subfolders recursively.
For example if there are 4 top level folders: The copy progress part of files in the first folder is between 0% and 25%.
If there are another 10 folders in the first folder then the copy progress part for the first of the 10 folders is between 0 and 2,5%.
Perhaps the 100% should not divided by the number of subfolders, but by the number+1. This should also be used in the recursion step.
Then in the above example the files in the top level folder itself would have a progress part between 80% and 100%.
B) Assumption: 50% + (50% of 100%-50%) != 100% (a logarithmic approach)
The current copied Megabytes are counted.
After every copied Megabyte the progress is computed like this:
Code: Select all
NewProgres = OldProgress + (100%-OldProgress)*0.01
At around 50% copy progress 2 MB copied will result in 1% progress.
At around 66% copy progress 3 MB copied will result in 1% progress.
At around 75% copy progress 4 MB copied will result in 1% progress.
...
I know this kind of progress could be confusing. But usually the user knows how much MB he has to copy. So he knows when to expect the progress to stop.
Code: Select all
10MB -> 10%
40 MB -> 33%
70 MB -> 50%
120 MB -> 70%
160 MB -> 80%
230 MB -> 90%
300 MB -> 95%
1 GB -> 0,999956829% ;-)
Or another logarithmic approach should be tried
Background Transfer Manager
Both concepts could be adapted for BTM.
A) Every item in the BTM gets a progress part (100% divided by the number of items.). It is divided for their folders recursively.
If the user adds an item, then the progress parts of the uncopied items is divided again.
Only if the queue is empty the progress starts again from zero.
B) It is straight forward to use it in BTM
This behavior could also be used in sync tool to show the progress of the compared folders.
And of cause in Windows 7 task bar icon.