Skip to content

Instantly share code, notes, and snippets.

@wonderful-panda
Last active December 21, 2015 12:09
Show Gist options
  • Save wonderful-panda/6304167 to your computer and use it in GitHub Desktop.
Save wonderful-panda/6304167 to your computer and use it in GitHub Desktop.
msbuildによるファイルコピーのサンプル *.obj, *.bak と、 .svn配下のファイルを除いてフォルダ階層ごとsrcdirからdestdirへコピーする
<?xml version="1.0"?>
<Project DefaultTargets="CopyFiles" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<TargetFiles Include="srcdir\**"
Exclude="**\*.obj;**\*.bak;**\.svn\**" />
</ItemGroup>
<Target Name="CopyFiles">
<Copy SourceFiles="@(TargetFiles)"
DestinationFiles="@(TargetFiles->'destdir\%(RecursiveDir)\%(Filename)%(Extension)')"
SkipUnchangedFiles="true" />
</Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment