asp.net - MSBuild script to remove old files from a directory that are no longer in source control -


the context live website using teamcity pull git. deployed website not under source control. need clean old files on deployed site no longer in source control particular folder. we're doing in msbuild deleting in folder first, before doing copy:

<itemgroup>     <dirstoclean include="$(webdir)\foldertocleanse" /> </itemgroup>  <target name="cleanwork">     <removedir directories="@(dirstoclean)" /> </target>  <target name="copyfiles">     <message text="== copying website files =="></message>     <copy sourcefiles="@(all)" destinationfiles="@(all->'$(webdir)/%(recursivedir)%(filename)%(extension)')" skipunchangedfiles="true" overwritereadonlyfiles="true"></copy> </target> 

we want able without deleting files in foldertocleanse , re-transferring everything, because not elegant , interferes change detection software.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -