I have written a simple script that launches robocopy in order to perform a backup. Now I would like to track the progress of such task.
In order to accomplish this I have measured the file size both from source and destination path with a chunck such as $size = Format-FileSize ((Get-Item $file).length)
. But it returns the same sizes for both source and destination, despite the fact that the copy was not finished yet.
As a workaround I also tried a dry run with robocopy (robocopy $file c:\fakepath /L /XJ /R:0 /W:1 /NP /E /BYTES /NFL /NDL /NJH /MT:64
), but I have obtained the same result.
How can I actually check the backup progress?