MBS MacFileOperationStatusMBS

I have a question for Christian !!
How i pass the TotalBytes to progress bar maximum?

MainWindow.Bytes.text=FormatBytes(status.bytesComplete)+" of "+FormatBytes(status.TotalBytes)

Above is from example MacfileUtilasync.
I have the progressbar.value inside the event handler (statusChanged),and work perfect,i need only to pass the totalbytes only.
this is the method i use

[code]Dim CellPath, DestPath As String
Dim source, dest As FolderItem
dest = SpecialFolder.Desktop.Child(“test”)
m = New MyFileOperation
MainWindow.pBar.Value = 0
For i As Integer = 0 To MainWindow.Listbox1.ListCount -1

CellPath = MainWindow.Listbox1.Cell(i, 1)
source = GetFolderItem(CellPath, FolderItem.PathTypeNative)

m.CopyObject(source, dest, "", m.kFSFileOperationDefaultOptions, 0.5)

Next[/code]

do you know total number of bytes to copy for all files?
Than you could make an ongoing progress bar over all files.

[quote=255680:@Christian Schmitz]do you know total number of bytes to copy for all files?
Than you could make an ongoing progress bar over all files.[/quote]
Hi Christian.
Bytes is unknown…
If i use the bellow in 2 folders i get about 2022 files

Dim d As DirectorySizeMBS = f.CalculateDirectorySizeMBS(True, 0) Format(d.FilesCount, "0")
But from bellow i get 1086 objects

FormatItems(status.TotalObjects)

Is no possible to get the total files and complete files outside from statusChanged event?