Thanks Foxidrive
I got lucky in that the system DOES have QBasic to support this alt method
I tested this out on some files and it worked perfect. I made some adjustments outside of this source that you provided since I decided that I wanted the batch/qbasic script to get copied from one location C:\batches\ to the working directory where these config files are located and run once in that location and then perform a clean up process to remove the batch file from the folder that should only contain the 2 config file types.
Found out that for some reason the cleanup process couldnt be placed at the end of this after the pause which to me makes no sense.
I simply had an erase *.bat instruction after the pause to remove the copy of the batch/qbasic script from the config file directory and it told me File Not Found ... Yet, it worked in removing the Batch File from this directory. To get rid of the File Not Found message, I ended up calling to another batch file back at the c:\batches\ called cleanup.bat with a START C:\Batches\cleanup.bat which when placed after the pause worked correctly without the File Not Found oddity.
Not quite sure where the File Not Found message was coming from when the erase *.bat was successfully removing the batch file from the sort plan configuration directory... so I guess I discovered another NT4 oddity.
But as of right now, we have success!!!!!!!!!!!!!!!!!!!! This will work perfect so that I myself no longer have to manually edit many files weekly as well as coworkers who dont know their way around computers can simply click on a shortcut on the desktop and it will process the changes to all files so that I no longer get panic phone calls that the config files are messed up and having to step them through the process to edit these over the phone from home.
Sometimes I think that CH should allow a way to send gifts to others for their help on problems, although its a not for profit and not allowed. I'd be willing to send you a gift card to go out to lunch or dinner on me if it were allowed.
Through this process though, especially the scripts involving qbasic I learned that you can create a qbasic script edit.bas from within a batch script appending its instructions to the .bas file from batch and call it with qbasic /run %file% which is pretty cool. Never seen this done before as for usually when I mix batch with other languages such as C++, I already have the C++ file compiled,and then I am calling the program in its exe form to start. But your method allows for a single file to do it all vs calling a outside file/program. C++ wouldnt be able to be created and run the same way though because the .cpp file created from appended batch writes would have to be compiled first before execution and so the use of QBasic is perfect for systems with QBasic on them vs having to have a C++ compiler on them.
If it wasnt for the extremely strict security on this machines system to NOT introduce data via digital media transfer means, but hand coding is allowed at the terminal, I would have just gone the easy route of using Perl or C++ to achieve the same goal that was needed which I am familiar with from past experience. But given the limitations, I figured batch should be plenty enough to do this, BUT its going beyond my batch knowledge. And due to NT4 being a pain as was initially expected when i was running into troubles trying to craft a batch on my own from web script references for find and replace of text in files, I knew that someone here at CH would be able to assist and I was thinking that the plug was going to get pulled on this because NT4 was being a serious pain, but you came up with a really sexy way of pulling it off with QBasic when NT4 was putting up roadblocks.
For the find and replace with C++ I would have read in all data from the config file up to the detection of the LS: N or $LASTSORT N and write this to a temp file. Then write appended LS: Y or $LASTSORT Y to this temp file depending on an IF condition like you have in yours, and then read in from original file all contents from the end of the LS: N or $LASTSORT N to EOF and append that data to the temp file, although to do this for all files, i would have probably cheated by using a SYSTEM(); call and performed a DIR *.* >directory.log and then accessed the directory.log to then step through all the files one by one running this process and in the end deleting the original file and then renaming the temp file as the original, until I got to the end of the directory.log listing of files. There may be a better method vs a system call using C++, but I havent gotten to that in depth with C++ yet to work staying strictly within C++ methods and not going outside of the cheating to run to system calls and tapping into DOS features and then read in from that into the C++ logic. I have a tendency to make programs that are down and dirty and not reinventing wheels by cheating to the use of system calls, although people in the past have also pointed out to me that in trying to avoid reinventing the wheel, I ended up reinventing the wheel using my system call method because for example with Perl there was a function I was unaware of that handled this within Perl and extremely well.
What you created was well thought out and professionally crafted imo
Anyways I have babbled enough. Thanks so much to You and BC on the efforts to get this working for us