Microsoft RoboCopy Task

Jan 22, 2010 at 2:25 PM

Hi all,

Firstly I'd like to commend you all on such a great effort with this pack, without doubt this is saving a lot of developers out there a great deal of time so well done!

Secondly, my question is: Is there any such task that wraps Microsofts Robust Copy (RoboCopy)? In paricular I would like to use the mirror switch, so that when I perform a deployment both the destination is kept in sync with the source tree to avoid all the clutter and junk - which also spares me having to define a "Clean" target. I did notice MSBuild.ExtensionPack.FileSystem.Sync was in the pack, but I was thinking something more along the lines of what Tigris.org have on offer, or what was mentioned on "How Steve Got Burned Today".

Ideally I'd like to just stick with using just the MSBuild Extension pack, so thought I'd ask here first.

Thanks in advance,

Coordinator
Jan 22, 2010 at 3:22 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Jan 22, 2010 at 3:25 PM

Hi Chidgey

I've spoken to Steve and we'll get this implemented fairly soon.

Mike

Coordinator
Jan 26, 2010 at 9:07 PM

The  RoboCopy task has been checked into the 3.5.6.0 branch.  Sample:

<MSBuild.ExtensionPack.FileSystem.RoboCopy Source="C:\b" Destination="C:\bbzz" Files="*.*" Options="/MIR"/>
<MSBuild.ExtensionPack.FileSystem.RoboCopy Source="C:\a" Destination="C:\abzz" Files="*.txt" Options="/e"/>

Note you could also use the new GenericTool task. Sample:

 <Target Name="Default">
        <ItemGroup>
            <Param Include="Source">
                <value>c:\b</value>
            </Param>
            <Param Include="Destination">
                <value>c:\bb 3</value>
            </Param>
            <Param Include="Files">
                <value>*.*</value>
            </Param>
            <Param Include="Options">
                <value>/Mir</value>
            </Param>
        </ItemGroup>
        <MSBuild.ExtensionPack.Framework.GenericTool Executable="robocopy.exe" Parameters="@(Param)" SuccessExitCodes="0;1" WarningExitCodes="2;4" ErrorExitCodes="8;16"/>
    </Target>

 

 

Jan 27, 2010 at 2:13 PM

Thanks Mike!

I'll be making use of that new task when I revise the scripts I've put in place so far. The GenericTool looks like it could be quite handy too, judging from the fact it can ignore certain return codes - that's just what I needed to do the other day instead of ignoring all return codes.

Thanks again,

Adam


From: [email removed]
To: [email removed]
Date: Tue, 26 Jan 2010 14:07:30 -0800
Subject: Re: Microsoft RoboCopy Task [MSBuildExtensionPack:81714]

From: mikefourie
The RoboCopy task has been checked into the 3.5.6.0 branch. Sample:

<MSBuild.ExtensionPack.FileSystem.RoboCopy Source="C:\b" Destination="C:\bbzz" Files="*.*" Options="/MIR"/>
<MSBuild.ExtensionPack.FileSystem.RoboCopy Source="C:\a" Destination="C:\abzz" Files="*.txt" Options="/e"/>

Note you could also use the new GenericTool task. Sample:

 <Target Name="Default">
        <ItemGroup>
            <Param Include="Source">
                <value>c:\b</value>
            </Param>
            <Param Include="Destination">
                <value>c:\bb 3</value>
            </Param>
            <Param Include="Files">
                <value>*.*</value>
            </Param>
            <Param Include="Options">
                <value>/Mir</value>
            </Param>
        </ItemGroup>
        <MSBuild.ExtensionPack.Framework.GenericTool Executable="robocopy.exe" Parameters="@(Param)" SuccessExitCodes="0;1" WarningExitCodes="2;4" ErrorExitCodes="8;16"/>
    </Target>



Read the full discussion online.
To add a post to this discussion, reply to this email (MSBuildExtensionPack@discussions.codeplex.com)
To start a new discussion for this project, email MSBuildExtensionPack@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now