I had a little play with the idea...
The post-build command:
Code: Select all
for %I in "$(OutputDirectory)\*.pdf" do copy %I "C:\Users\<username>\Desktop"
Runs correctly but nothing is copied to my desktop. My guess is it can't interpret the list of files in the source part of this command. In Madcap's example they have a specific list of files in parentheses instead of a wildcard.
In your command you aren't supplying a destination address correctly - needs to be in quotes (see examples on
https://help.madcapsoftware.com/flare20 ... Events.htm)
As Dave said, for a simple copy of output to a destination address, I'd use Publish destinations in the project and the Publish command. Works a treat.
If you wanted to do more complicated stuff such as combining your output with other PDFs and packaging into a ZIP for distribution, I'd do it all in a batch file and just call the batch file as a post-build command.
For example, the post-build command:
Code: Select all
C:\Users\<username>\Desktop\mybatch.bat
and a batch file containing:
Code: Select all
xcopy "<sourcepath>\*.pdf" "<destinationpath>"
Will copy all PDFs from source to your destination after a build. Using a batch file means you can do all sorts of more creative things with your files after a build operation including calling other scripts or doing other file manipulations.