Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS 2010 Team Build - rename a file

Tags:

xcopy

tfs

As part of my TFS 2010 team build, I'm trying to copy a configuration file from a network location to the output folder where the build goes to.

Using xcopy as an invoke process task, I've successfully gotten it all working EXCEPT that I want to rename the file as part of the copy. The problem is that if you supply a different destination filename, XCOPY asks if the destination is a file or a directory e.g.

XCOPY \\networkshare\configs\live.config \\networkshare\release\server.exe.config /R /Y

results in XCOPY asking me to press F if server.exe.config is a file or D if it's a directory. XCOPY doesn't seem to have any way to suppress this behaviour. I've tried using the basic COPY commmand but Team Build just says that it doesn't recognise the COPY command.

Is there any way to easily rename a file as part of Team Build or use another command line tool to achieve this?

Cheers

like image 489
Isaac Abraham Avatar asked Apr 15 '11 17:04

Isaac Abraham


1 Answers

Just to confirm - setting the process as CMD.EXE and starting the arguments as "/c copy" does the trick.

like image 133
Isaac Abraham Avatar answered Sep 22 '22 22:09

Isaac Abraham