amit 3 Posted June 22, 2023 Hi, I created project name A. When I compile project I will get name A.exe. I need to define some directive in source code and it will change the output application name when it was compiled. if it's possible to do that and how? for example Program A; {$DEFINE B} ... begin .. end. if I code it like this. I need to have B.exe or AB.exe instead of A.exe when it was compiled. Share this post Link to post
Fr0sT.Brutal 900 Posted June 22, 2023 No. There's only rename being run by post-build event and libsuffix 1 Share this post Link to post
programmerdelphi2k 237 Posted June 22, 2023 @amit you can try this way: create a bat file with your logic ( you'll need define a enviroment var with your new-name, for example...) using the Post-Build event you can call it rem --- OldName = full path + filename = c:\...\MyOldName.exe set OldName=%1 rem --- NewName = new file name = MyNewName.txt set NewName=MyNewName.exe rem ---------- renaming file ----------- ren %OldName% %NewName% > texto.txt Share this post Link to post