Jump to content
Sign in to follow this  
micechal

Append particular number of bytes to a file

Recommended Posts

micechal

Hi.

I'm trying to append some bytes to a file not being a text file. I'm using this code right now:

FileWrite($handle, 0)

And it is appending bytes, albeit too much. After this operation, file size is increased by 4 bytes, but I want more precision. I want to be able to append as little as possible - one byte.

How can I do this?

Solved by doing this:

FileWrite($handle, Binary("0xFF"))
Edited by micechal

Share this post


Link to post
Share on other sites
micechal

FileWrite($handle, 0xFF)

This one results in

 

FF 00 00 00

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×