cruisecontrol.netxcopy

cruise control .net : xcopy not working for copying files to remote server


I am trying to copy a folder to a remote machine using xcopy. This command is executed via cruise control task. I can run xcopy source destOnRemoteMachine successfully if i am running it from command prompt. But if i am executing it from cruise control .net, it is always complaining about "Invalid drive specification" error.

I tried :

> <exec
> executable="c:\Windows\System32\xcopy.exe">
>                 <baseDirectory>$(BASE)\Project</baseDirectory>
>                 <buildArgs>.\*.* RemoteMachine\Project /Y</buildArgs>
>                 <buildTimeoutSeconds>10</buildTimeoutSeconds>
>                 <successExitCodes>-1,0,1</successExitCodes>
>               </exec>

and :

<exec executable="c:\Windows\System32\cmd.exe">
        <baseDirectory>$(BASE)\Project</baseDirectory>
        <buildArgs>/C xcopy $(BASE)\Project\*.* RemoteMachine /y</buildArgs>
        <buildTimeoutSeconds>30</buildTimeoutSeconds>
        <successExitCodes>-1,0,1</successExitCodes>
      </exec>

Any Suggestions?


Solution

  • thanks for your answer. Putting xcopy in batch was also not helpful, the problem was something else. here is problem:

    It was problem with the account on which Cruise Control .net service was running. It was running as local service. Thus was not able to see the network path. I changed CCNet Service to run on a domain account which have permission to read/ write on remote machine. This solved my problem.

    Thanks.