Page 1 of 1

Post-build event not copying file

Posted: Tue May 17, 2022 7:48 am
by LauraM
I'm trying to copy a PDF output from the output directory to the resources directory so I can link the file in the HTML5 output. Here's the syntax I have in the post-build event box:

Code: Select all

for %I in "$(OutputDirectory)Agency-onboarding.pdf" do copy %I "$(ProjectDirectory)Content\Resources\PDFs"
What am I doing wrong?

Re: Post-build event not copying file

Posted: Wed May 18, 2022 4:58 am
by Nita Beck
I can’t say what might be wrong with what you’ve crafted, but I have a question: Why not just set up a destination file that will publish the generated PDF to Resources\PDFs? Maybe you’re seeking something more automated, so I’ll sit down now. ;)

Re: Post-build event not copying file

Posted: Wed May 18, 2022 6:18 am
by LauraM
Nita, yes I'm investigating that option right now. I can create a publish destination for the PDF folder for my batch target. However, is there a problem within Flare if you publish inside the Content folder? I think I saw something about error messages regarding that. If I can automate the process through a build event, I'd like to do that. Is it possible the build event isn't working because Flare won't allow things to be written to the Content folder?

Re: Post-build event not copying file

Posted: Wed May 18, 2022 4:12 pm
by Nita Beck
If I recall correctly, I’ve published PDFs back into the project and just ignored the message. I’m going on memory; don’t have access to Flare right now.

Re: Post-build event not copying file

Posted: Wed May 18, 2022 10:53 pm
by NorthEast
LauraM wrote:Nita, yes I'm investigating that option right now. I can create a publish destination for the PDF folder for my batch target. However, is there a problem within Flare if you publish inside the Content folder? I think I saw something about error messages regarding that.
You can set up a destination that's inside your project content folder. Flare does warn you about the dangers of this, but does not stop you doing it. So that'd work fine.
LauraM wrote:If I can automate the process through a build event, I'd like to do that. Is it possible the build event isn't working because Flare won't allow things to be written to the Content folder?
I've no idea about that. I've not got into using build events very much because they are so poorly documented in the help. But a destination will definitely work, so just use that.