Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

How to build the .exe in a different folder leaving the other generated files in the output path?

How to build the .exe in a different folder leaving the other generated files in the output path?

Problem:

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?

Solution:

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 properties
2. click on COBOL properties
3. click on Build Events
4. click on Edit Post-build
5. type copy or xcopy (with a trailing space)
6. click on Macros (to see all possible macro names)
7. double-click on TargetFileName
8. type the target folder to have the following:
xcopy $(TargetFileName) C:\Prod
9. click on OK
10. leave the Run the post-build event drop-down with On successful build
11. click on OK to exit

Tags (1)

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2017-10-18 22:04
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.