Pretty sure it is as simple as removing the spaces from the formats. That will be anything but simple.
I suggest doing one format at a time, then testing. This way you don't get too far ahead of a mistake if you accidentally make one.
Not like I've ever screwed up in X-build and then had to chase my tail for hours or anything, LOL
Also, copy your post with a different name (like "test", or "no spaces") and edit/save that one! Leave your original alone!
But, I wouldn't do it. Reading code without spaces sucks.
Why do you punch the programs back? Lots of manual edits?
It isn't my place to tell anybody how to run a shop. But, I prefer to make the edits in CAM, and post new every time.
This also gives you a much easier to use reference when you cant remember what the magic SFM for that insert or end-mill was.
Edit the tool properties. Bam it is always there.
This is how I do it 90% of the time.
Now, I do have a few programs that were done in a multi fixture doc, for jobs with 10-20 parts on the table, that took hours to order for efficiency.
Those ones stay in the control with a back-up on a thumb drive. But that is my only exception.
I don't know? Maybe its just me.
But ever since I understood how CNC machine programs were actually produced in CAM, I have never understood saving NC files.