oveview
I need a gui to select a file, then the user select a second file, and the specific paths within the first file need to be replaced by the path of the second file
Requirements.
this is a binary file, not text.
The gui will only allow a .layout file to be selected for the first file. The gui will show this path and file after selection.
The gui will only allow the second file to be a .plan file.
The gui will show this path and file after selection, as well as keep the first file path and file selection (two different boxes)
The program will scan thru the .layout file for 00 00 00 C:/ (in hex), if the selected layout file is on the C: drive, if on another drive replace with that drive letter.
if it finds an instance which has .layout in the path skip, see attachments for which ones to skip.
once it finds a legitimate one, replace the path with the .plan filename path(without the .plan and with / instead of \), and pad any extra with 00s. If the selected .plan is longer, stop scanning and report back the condition.
All paths found (except the ones to skip) should be the same. report back if they are not.
Report back all instances found plus 75 bytes, and the replaced to the same number of byte.
report the above in a window which is wide enough to see one replacement on one line.
the window should be tall enough to show 25 replacements.
the application should also log all of the above to a log file
the application should also remember the last selected template directory and file for the next time, as it is expected to be the same file most of the time.
see pictures
note in the example the directory and file were changed and then padded with one extra 00
As the replacing of bytes is being padded, after the file is updated it should still have the same amount of bytes as the orginal file. if it does not, you have done something incorrectly