Post-build event not copying file

This forum is for all Flare issues not related to any of the other categories.
Post Reply
LauraM
Jr. Propeller Head
Posts: 2
Joined: Fri May 13, 2022 12:30 pm

Post-build event not copying file

Post 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?
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Post-build event not copying file

Post 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. ;)
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
LauraM
Jr. Propeller Head
Posts: 2
Joined: Fri May 13, 2022 12:30 pm

Re: Post-build event not copying file

Post 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?
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Post-build event not copying file

Post 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.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Post-build event not copying file

Post 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.
Post Reply