CPE Script and Config Copy

I have just started getting into scripting and have modified a few scripts to my needs. I would like to have them upload with the cpe config file when the techs put the units together. Presently they do a cut past of a text file with the config commands in it to a terminal window in winbox. As the script commands are different then ROS commands it does not work to combine everything in to one text file.

Can this be done? or is there a better way?

Thank
and double thanks to all of have posted scripts that I used as starting points.

Run “/system script export” to get the scripts in a format than can be tacked on to configuration files.

wo_Ot

any example?..

Thanks, should have caught that one!