Hi,
This is a follow on from the question you asked recently.
http://www.codeproject.com/answers/70212/How-to-reserve-space-for-a-file-like-Explorer-does.aspx[
^]
You have probably found out from your own experiments that SetLength is physically clearing the allocated space on the drive and this does take time, in fact it takes exactly the same time as if you were to write a file of the same length. Getting progress reports is not possible as SetLength does not return until this process is complete.
One of the answers to your previous post suggested writing a file of the correct size and of course if you were to do this you would be able to generate progress reports giving percent completion.
You may be unaware that NTFS formatted drives have an optimisation which allows SetLength to return almost immediately, often within about 10ms, although the allocated space cannot actually have been cleared in that time.
My suggestion is
1) Detect the drive format (System.IO.DriveInfo)
2) If it's NTFS use SetLength which will be very fast
3) For any other format, write a file of the desired length and generate you own progress reports.
Alan.