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 
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/xcopy.mspx?mfr=true

No comments:

Post a Comment

Featured post

Getting Started With SOLR

Getting Started with Solr ·           Features o    Hit highlighting o    Auto correction o    Faceted Search o    Multi lan...