Hi guys.
Need a script that will add the file size to the beginning of this file. (*8 bytes)
--
The first 4 bytes are the file size in hexadecimal format, the remaining 4 bytes just zeros.
*In "Little Endian"
---
Example: D015020000000000
--
These 8 bytes are necessary for the proper work of the game. (*when using "ReImport2" in "QuickBMS")
-
In zip archive 2 file, one without 8 bytes, the other with the addition of these 8 bytes, with the file size.
Thx
Need help \ Adding 8 bytes to the beginning of the file. (*File size)
-
- Posts: 11
- Joined: Fri Dec 30, 2016 8:21 pm
-
- Posts: 719
- Joined: Sat Sep 28, 2019 7:00 pm
Re: Need help \ Adding 8 bytes to the beginning of the file. (*File size)
You can use something like this:
In case of integrating this in other script don't forget to disable append mode if needed and also change position to beginning of the file, because "put" writes to current position.
Code: Select all
get SIZE asize
append -1
put SIZE longlong
In case of integrating this in other script don't forget to disable append mode if needed and also change position to beginning of the file, because "put" writes to current position.
-
- Posts: 11
- Joined: Fri Dec 30, 2016 8:21 pm
Re: Need help \ Adding 8 bytes to the beginning of the file. (*File size)
spiritovod wrote:You can use something like this:Code: Select all
get SIZE asize
append -1
put SIZE longlong
In case of integrating this in other script don't forget to disable append mode if needed and also change position to beginning of the file, because "put" writes to current position.
ok, it works great.
Thank you very much!