Friday, 29 August 2014

Copy file(s) from one project to another using post build event…VS2012

When we want to copy one project to another after post Build.

Select the project --> Properties --> Build Events

xcopy $(TargetDir)\*.* C:\inetpub\wwwroot\sitecorelearning\Website\bin\ /r /f /y

or you can use

c:\Windows\System32\xcopy.exe "$(TargetPath)" "C:\inetpub\wwwroot\yourproject\Website\bin" /y

Here are some commonly used switches with xcopy:
/I - treat as a directory if copying multiple files
/Q - Do not display the files being copied.
/S - Copy subdirectories unless empty.
/E - Copy empty subdirectories.
/Y - Do not prompt for overwrite of existing files.
/R - Overwrite read only files.

More details can be found

No comments:

Post a Comment