Search code examples
lazarus

execute some script after compile


i wanna to copy some file after lazarus compiled my project, like Build event in visual studio, I found the similar option in Lazarus:

enter image description here

but when I press ctrl+f9 to compie, will thrown error:

Executing command after missing executable ""

enter image description here


Solution

  • As I read the documentation, you are expected to provide an executable command. A .bat file is not executable which would explain why your command fails.

    Prepend your command with cmd.exe /c to provide the executable which processes the .bat file.

    cmd.exe /c "G:\Lazarus project\dll test\copy.bat"