Quote:
Originally posted by Jhd.Honza
The aim is to finish copying even when error occurs. If you try to copy a file in explorer, using API or any other way, it fails with the first error and no data are available.
Lot of files however, e.g. text, bitmaps or videos are usable without some bytes. The errors I am going to get around are bad sectors probably the most time (disk failure, damaged floppy or scraped CD).
(I have possibility of 3 choices: omit unreadable byte, repeat previous one ore fill with predefined one (0 in case above)).
Put your code into try-catch-finally block . the "finally" part always execute even if any error happens . So , you can put your finalizing code there .