source
to dest
folder:
C:\source
C:\dest
<AllFolderFiles Include="$(SourceDir)\**\*.*" />
<Copy SourceFiles="@(AllFolderFiles)"
DestinationFiles="@(AllFolderFiles -> $(DestinationDir)\
%(RecursiveDir)%(Filename)%(Extension)')" />
You can also use recursion to delete all files in folder and its subfolders:
C:\source
<FilesToDelete Include="$(ToDelete)\**\*.*" />
<Delete Files="@(FilesToDelete)" />
Anybody knows easier solution?
1 comment:
One problem I see with your DELETE fucntion is, it deletes all the files recursively but does not delete the folders recursively. You would still have the folder structure.
Post a Comment