I want to create a post build script that moves files from the build directory to a remote (UNC) file share.
This line:
xcopy "C:\TeamCityBuild\project\WebSite\*" "\\192.168.1.1\WebSite\" /C /R /Y /E
Works fine when it is ran in a DOS-window but when TeamCitys buildrunner sln2008 tries to run it it fails with the message “Invalid drive specification“
I have shared the folder with full rights for ‘Everyone’ on the remote server.
Any ideas?
Just a guess. Not quite sure if it solves your problem. We had a similar problem using CruiseControl and deploying our application to remote JBoss server.
We’ve added
before each copy. So that it ‘mounts’ the remote share before trying to access it. Note: you probably need to specify the username and password for the command (consult the command line for details).
The
'net use'seems needed even if you run the automated job as the same user you log on manually. These two kinds of sessions seem not to share remote shares information.