robocopy in post-build events
Posted: Thu Mar 16, 2017 8:18 am
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 "$(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?