tags:

views:

19

answers:

1

Hello 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 .o and .d except the .cpp files.can any body specify code or explain how it can be done.

+2  A: 

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.

Joey