Can you write an AHK script that makes a file named A.IDF that is a list of all files in a folder?

The list should be in binary format. The structure of the list should be this:
1. Name of the file (always 8 bytes long, and if the name is shorter, pad the remaining bytes with spaces).
2. Extension of the file (always 3 bytes long).
3. Size of the file (always 4 bytes long, with the least significant byte being first, then the second-least significant byte, and so on).

There must be no padding bytes between entries. So the most significant byte of the size is followed immediately by the name of the next file in the folder.

Example: suppose we have a folder with two files: PICTURE.PNG (size = 20000 bytes) and TEXT.TXT (size=14 bytes).
The resulting list file this example should be this (in hex form): 31 20 20 20 20 20 20 20 50 4E 47 00 00 00 00 31 20 20 20 20 20 20 20 54 58 54 20 4E 00 00
Explanation:
1. 50 49 43 54 55 52 45 20 - this is the name of the first file ('PICTURE').
2. 50 4E 47 - this is the extension of the first file ('PNG').
3. 20 4E 00 00 - this is the size of the first file (which is 4e20 bytes in hex).
4. 54 45 58 54 20 20 20 20 - this is the name of the second file ('TEXT').
5. 54 58 54 - this is the extension of the second file ('TXT').
6. 0E 00 00 00 - this is the size of the second file.
