I can see that there is a copyDirectory activity, but no copyFile activity. Is there any way to copy only one file from directory?
Or maybe there is a way to delete a single file from directory?
Thank you for your help.
There is no FileCopy activity. You can 1) develop your own custom activiy or 2) use the InvokeMethod.
You don't have to write your own activity. Try to use TFS Build Extensions instead. There is a RoboCopy workflow activity you can use to copy files. there are a lot of other very useful activities like E-mail activity, ...
Follow this nice guide to modify DefaultTemplate workflow or any workflow inside BuildProcessTemplates folder.
I would use the InvokeProcess activity and call the xcopy command in there with the correct arguments. See for an example: http://www.ewaldhofman.nl/post/2010/11/09/Part-15-Fail-a-build-based-on-the-exit-code-of-a-console-application.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With