I've been using post-build events to copy files into the Flare output (HTML5). The copy command works fine (and yes, I do use quotes around the file name). I have been working on copying our legal notices into the output, as I don't want to index them. This involves copying a few files and a folder of resources. I initially tried xcopy, but that's deprecated, and the /EXCLUDE flag didn't seem to work. So I tried Robocopy, but nothing happened when I did - it failed silently. Tech Support had nothing they could tell me about why it failed, so maybe someone out there can. Here's the command:
Robocopy "$(ProjectDirectory)\legal" "$(OutputDirectory)" /S /XF "*.docx"
I tried several variations: using the full path to Robocopy, changing case, leaving out the /XF option. The robocopy command works fine if I execute it in a DOS shell with substitution of the actual paths for $(ProjectDirectory) and $(OutputDirectory). I even tried making deliberate errors (such as robocapy) to see if I got any error messages (which I did). So I don't think it's a syntax error, and the files are all present. Any ideas?
robocopy in post-build events
-
- Sr. Propeller Head
- Posts: 330
- Joined: Tue May 13, 2008 3:27 pm
- Location: Christchurch, New Zealand
Re: robocopy in post-build events
Maybe try putting your Robocopy command in an external script and calling that script via the Flare target post-build event - and pass the output directory as a parameter.
Your target's post build event would be something like:
And post_publish_script.cmd (in the high level project dir):
Where %1 is the output directory parameter.
Your target's post build event would be something like:
Code: Select all
"$(ProjectDirectory)post_publish_script.cmd" "$(OutputDirectory)"
Code: Select all
Robocopy "legal" "%1" /S /XF "*.docx"
Re: robocopy in post-build events
No, that didn't work either.
Re: robocopy in post-build events
I'm wondering if anyone got Robocopy working successful in a pre- or post-build command yet? Have tried myself with no luck.
P
P