#region Backup data File///<summary>//Backup data File///</summary>//<param name= "Strfi Lename "> Backup file directory </param>//<param name=" Strtypekufen "> Send or Receive </param>//<param name = "Strmessageinfotype" > Message type </param> public void Backupmessageinfo (String strfilename,string strtypekufen,st Ring Strmessageinfotype) {if (file.exists (strFileName)) {String strpath = Pa Th. Combine (AppDomain.CurrentDomain.BaseDirectory, "backupmessageinfo"); String strcombinpath = DateTime.Today.ToString ("Yyyy-mm-dd"). ToString () + "\ \" + Strtypekufen.trim () + "\ \" + Strmessageinfotype.trim (); strpath = Path.Combine (strpath, Strcombinpath); if (! Directory.Exists (strpath)) {directory.createdirectory (strpath); } #region Delele Northeasttycoon//if (! DiRectory. Exists (strpath))//{//Directory.CreateDirectory (strpath); }//strpath = Path.Combine (strpath, DateTime.Today.ToString ("Yyyy-mm-dd")); if (! Directory.Exists (strpath))//{//Directory.CreateDirectory (strpath); }//strpath = Path.Combine (strpath, Strtypekufen.trim ()); if (! Directory.Exists (strpath))//{//Directory.CreateDirectory (strpath); }//strpath = Path.Combine (strpath, Strmessageinfotype.trim ()); if (! Directory.Exists (strpath))//{//Directory.CreateDirectory (strpath); } #endregion Delete Northeasttycoon string strtempfile = Strfilename.substring (strFileName . LastIndexOf ("\ \") + 1); strpath = Path.Combine (strpath, strtempfile); File.Copy (strFileName, strpath, true); }} #endregion
C # backing up data