Quicknote: Bizarre copy issue on build server

Normally using copy C:\test.txt C:\test – if the folder does not exist it will create a file named test, however if the folder does exist, it should copy the file to the folder. On our build server however (running cruise control and msbuild) i got bizarre behaviour where the existing folder was deleted and replaced by a file named test. The workaround was to alter the build events in the code to contain a trailing slash, i.e. copy C:\test.txt C:\test\.

Note i am not sure on the accuracy of the cause of this, but just wanted to write a note to investigate further if it happens again.

You May Also Like

About the Author: rnowik

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.