Batch file to generate an executable file and delete the remaining files
I have made a batch file to generate an executable file(.exe).Now my requirment is that in the process of generating the executable file my batch file should delete the other generated files such as开发者_Python百科 .o and .d except the .cpp files.can any body specify code or explain how it can be done.
Usually you would be using a build automation tool like make
or MSBuild for this because those can track dependencies as well.
For a simple batch file you can easily delete all *.o
and *.d
files with
del *.o *.d
If you have other files that need to be deleted you can add those in the line as well.
精彩评论