No one said this would be easy but it is so tedious ....
CHDKCAM performs most functions by sending Lua commands to camera.
I send uBasic commands.
Problem is, the script data is being 'corrupted' at the camera end in a rather bizarre way .
I have found that the same thing happens when using the upload function of the original ptpcam modified for CHDK.
So, I have loaded the CHDKDE code on the camera and ptpcamGui.
In the console this works :-
download A/diskboot.bin D/test.bin
Good, so I can test this :-
upload D/test.bin A/test.bin
That does not work, no file from any directory can be uploaded because ptpCamGui console cannot open it.
EDIT
Unlike ptpcam that I normally use, ptpCamGui does not like capitals in filename
It also does not like the current directory letter being included in the pathname.
What version of ptpcam.exe is being used and is the source online ?
With my script data, two 0xFF are being inserted at the end and the rest of the data pushed to the left but not beyond character 36.
(The 'end' was added at the camera end.)
See attached file below :-