开发者

Batch file to generate an executable file and delete the remaining files

开发者 https://www.devze.com 2023-01-14 22:10 出处:网络
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开

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消