Reputation: 55
I have made a folder compiler for c using gcc and it creates useless files that I would like to delete when the program ends. I run the folder compiler through a bat file but it won't let me delete the files at the end. code:
compiler.exe
cls
runner.bat
del file.txt /F /Q
Upvotes: 0
Views: 1687
Reputation: 80203
If you are saying that the delete
isn't taking place, then the reason is that
runner.bat
transfers execution to the batch runner.bat
and when that terminates, so does the process.
You need
call runner.bat
which will return at the end of runner.bat
and continue with your main batch.
Upvotes: 3