Question (Unsolved) A quick technical question!
I am working on a chatbot written in Batch that learns from text files and then rewrites its own Batch script to directly incorporate what it has learned. My goal is to consolidate everything—the code and the accumulated knowledge—into a single file; the user simply needs to provide text files , I realize that this type of mechanism is unconventional and might trigger antivirus alerts. What do you think of this approach?
I’m curious to hear your thoughts.
3
u/pc1350 21d ago
I use to rewrite batch files with something like this:
findstr /B /V /C:"LLLLL#" "%~f0" >tmp.tmp&echo LLLLL#Sometext#>>tmp.tmp&move tmp.tmp "%~f0" >nulIn my batch file there is a line that starts with "LLLLL#" and I have replace it.
and Windows Defender does not pop up.
2
u/capoapk 21d ago
Thank you , Your method is interesting For my part, I use PowerShell to manage learning, generate JSON data, then rebuild some parts of the Batch in order to integrate the new knowledge directly into the script My goal is to keep the engine and all its memory in a single file Your approach could be interesting to simplify some parts of the rewriting
6
u/Shadow_Thief 21d ago
I've seen chatbots done with this technique before. It always felt like there were better ways to do this, but it's technically fine.