471,337 Members | 907 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

Modifying Last Few bytes of a file

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


Feb 20 '06 #1
1 960
Ahmad Jalil Qarshi wrote:
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

Feb 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Paul Paterson | last post: by
33 posts views Thread by Jason Heyes | last post: by
10 posts views Thread by draghuram | last post: by
35 posts views Thread by RyanS09 | last post: by
6 posts views Thread by magix | last post: by
6 posts views Thread by =?Utf-8?B?VGhvbWFzWg==?= | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.