NOTICE: Our Community is moving. Get more information.
When building a project, all output files are created in one location that is specified from the COBOL properties as Output Path. Is there a way to create the .exe in a different folder leaving all the other generated files in the output path?
It is not possible to have the .exe created in a different folder while the rest of the generated files get created in the output folder. However, a post-build event can be used to have the .exe file to be copied to another folder after a successful build.
Here are the steps to create a post-build event that copies the .exe file to a folder (e.g. C:\Prod) after each successful build:1. go to project properties2. click on COBOL properties3. click on Build Events4. click on Edit Post-build5. type copy or xcopy (with a trailing space)6. click on Macros (to see all possible macro names)7. double-click on TargetFileName8. type the target folder to have the following:xcopy $(TargetFileName) C:\Prod9. click on OK10. leave the Run the post-build event drop-down with On successful build11. click on OK to exit