.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

xcopy using C#

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :.NET Framework

I have to copy some of the files from one location on client to the server overnight. And for that I have heard xcopy would be best solution. Can someone provide a sample xcopy in C# and explain the code. 




View Complete Post

More Related Resource Links

XCOPY deployment of WCF application produces random exceptions

We are using a simple self-developed XCOPY-like tool for copying the binaries etc. of a WCF application directly into the physical folder of a virtual directory on IIS. After the deployment the application randomly throws an excetion ("The ObjectContext instance has been disposed and can no longer be used for operations that require a connection"). I know that this is EF related (we are using EF for data access purposes within our WCF services) but donÄt think it has anything to do with EF.However, the exception occurs absolutely without any pattern. Starting our app multiple times results in the excetion sometimes but it succeeds immediately afterwards. I even restarted the IIS windows service but the same phenomenon still exists afterwards.When I use the "Publish" dialog from VS2008 for the deployment everything is fine. However, we need to do the deployment through our script as we have a staging location between our dev and prod environments.What do we have to to in order to make a successfull and reliable XCOPY deployment and get rid of this strange behaviour?

How to Keep XCOPY-ed Files From being Checked Out

I have a script that uses DOS XCOPY to copy files to a SharePoint directory. I am using versioning on the document library. The files copy over just fine. The problem is, they show up as checked out to the person's account who uploaded them. Is there a way to make it so the files are NOT checked out when copied to SP using the DOS XCOPY? Thanks!!

Problem with XCopy deployment of SQL Server CE 3.5 SP2 Beta

As ErikEJ's article says (http://erikej.blogspot.com/2009/10/whats-new-in-sql-server-compact-35-sp2.html), "...Notice the “Private” folder, which contains a version of System.Data.SqlServerCe.Dll which should be used for private deployments, to prevent the “Assembly probing” issue".

I have following app.config file:

<?xml version="1.0" encoding="utf-8"?>
      <remove invariant="System.Data.SqlServerCe.3.5" />
      <add name="Microsoft SQL Server Compact Data Provider"
           description=".NET Framework Data Provider for Microsoft SQL Server Compact"
                 PublicKeyToken=89845dcd8080cc91" />
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <probing privatePath="sqlcelib" />

Zip or Nupack MVC Distro for Xcopy Deploys


You know what would be really nice is a non installer distro for MVC. Currently I run the installer locally and copy the bits from program files into our project lib folder and point the project assembly references there. I don't mind running an installer to get the VS templates but its a pain to sift through the bits and figure out which ones I need for the site to compile (Esp with MVC3 as there are a number of assemblies). Simply having a zip or better yet a nupack package would be a lot simpler.

Storing the assemblies in our lib folder ensures that everyone is using the same bits and eliminates the need of running an installer on all our servers when there is a new version. 

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend