1

I'm running a BAT file from the Pre-Build event of my Delphi projects to update certain files prior to each build. It currently contains hard-coded folder names pointing to the current project's folder. I'd like to try to make this relative to the folder of the current project so I can use the same file for all projects. Is there a way to know for sure what the current directory will be when this file is run? Or is there a symbol in Delphi that represents the folder of the project that I could pass to the BAT file as a parameter?

  • 4
    Did you read the documentation yet? [Creating Build Events](http://docwiki.embarcadero.com/RADStudio/en/Creating_Build_Events), particularly the part about using "predefined macros", like `$(INPUTDIR)`, `$(OUTPUTDIR)`, `$(PROJECTDIR)`, etc (see [Build event macros in Delphi XE](https://stackoverflow.com/questions/5533718/)) – Remy Lebeau May 15 '20 at 19:37
  • The documentation really doesn't help since it refers to the macros but in XE the macro list is blank and the documentation doesn't tell you what they are. But your link to the post Build event macros in Delphi XE has the information on this. Thanks! – Ron Schuster May 18 '20 at 13:57

0 Answers0