Modifying Last Few bytes of a file

  • Thread starter Thread starter Ahmad Jalil Qarshi
  • Start date Start date
A

Ahmad Jalil Qarshi

Hi!

I have files having size upto 50MB. I have to Delete last 100 bytes of each
of these files and save the modified files.

Is there any way to solve this problem.

Regards,

Ahmad Jalil Qarshi
 
Ahmad said:
I have files having size upto 50MB. I have to Delete last 100 bytes of each
of these files and save the modified files.

Is there any way to solve this problem.

Open a FileStream, call FileStream.SetLength with the desired length,
then call Dispose.

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top