I just can’t find a way on the command line to say “copy all the files from directory A to directory B, but if the file already exists in directory B, do not overwrite it, no matter which file is newer, and don’t ask me.”
I went through copying, moving, xcopy and robocopy, and the closest I can get is that you can tell robocopy “copy A to B, but not overwrite older files with older files”, but that doesn't work for me. I looked at xxcopy, but canceled it because I don’t want to have third-party dependencies on the Visual Studio post-build event, for which other SVN users will need to install this build tool.
I want to add a command line to the post-build event in Visual Studio 2010 so that files created from T4 templates for new EF objects are distributed across the project folders to which they belong, but the regenerated files for existing objects do not overwrite the potentially editable destination files.
Since the T4 template is being restored, the original file is always newer, and I cannot reliably use the “new” switch, I don’t think.
I use partial classes for those elements for which I can, but there are other things that I generate that cannot use partial classes (for example, creating a default EditorTemplate file or DisplayTemplate * .ascx).
Does anyone have similar problems that they solved?
windows batch-file xcopy robocopy
Tony Nov 19 '10 at 19:50 2010-11-19 19:50
source share