I have a problem related to the automation of a task. I need to create a .bat file that deletes some logs generated by an application that have a .txt extension and this I do in the following way:
cd "C:\Users\pablo\Desktop\prueba_script" del /F /S /Q *.txt
The idea now is to be able to delete those files but not by their extension, if not by their name or by their name, I explain:
File:
logArchive.txt
logIncidence.txt
I need the script to take part of its name " log " and execute the deletion of this ... or by its full name.