Robocopy uses relative path for Source and Destination paths

4

I'm trying to use RoboCopy in my TFS Build Template to copy some files, but for some reason it inserts "C:\Windows\system32" in front of my Source and Destination paths, even though I am passing in absolute paths. I know that the robocopy.exe is stored in "C:\Windows\system32", but how can I make it use my absolute file paths?

Here is the output from my TFS Build Log. This is the command that gets executed:

RoboCopy 'C:\Builds\27\RQ4TeamProject\BuildProcessTests\Binaries' '\\iq-tfsbuild1\buildDrops\BuildProcessTests\0.99.6.32749' /E /XD 'RQ4'

And here is the error reported by robocopy:

-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Thu Jan 24 17:08:47 2013
Source : C:\Windows\system32\'C:\Builds\27\RQ4TeamProject\BuildProcessTests\Binaries'\
Dest : C:\Windows\system32\'\iq-tfsbuild1\buildDrops\BuildProcessTests\0.99.6.32749'\
Files : *.*
○
Exc Dirs : 'RQ4'
○
Options : *.* /S /E /COPY:DAT /R:1000000 /W:30
------------------------------------------------------------------------------
2013/01/24 17:08:47 ERROR 123 (0x0000007B) Accessing Source Directory C:\Windows\system32\'C:\Builds\27\RQ4TeamProject\BuildProcessTests\Binaries'\
The filename, directory name, or volume label syntax is incorrect.

Any ideas what is wrong and how I can get it to use JUST the absolute paths I provide? Any suggestions are appreciated. Thanks

team-foundation-server
directory
copy
path
robocopy
asked on Server Fault Jan 25, 2013 by deadlydog

1 Answer

4

Use double quotes around the paths if necessary, not single quotes.

answered on Server Fault Jan 25, 2013 by MDMarra

User contributions licensed under CC BY-SA 3.0