XpertData is Source Folder that we have to take Backup and store it on E:\Web
string sourceDir = @"D:\XpertData";
string backupDir = @"E:\web";
try
{
string[] picList = Directory.GetFiles(sourceDir, "*.mdb");
string[] txtList = Directory.GetFiles(sourceDir, "*.ldb");
foreach (string f in picList)
{
string fName = f.Substring(sourceDir.Length + 1);
File.Copy(Path.Combine(sourceDir, fName), Path.Combine(backupDir, fName), true);
}
foreach (string f in txtList)
{
string fName = f.Substring(sourceDir.Length + 1);
try
{
File.Copy(Path.Combine(sourceDir, fName), Path.Combine(backupDir, fName));
}
catch (IOException copyError)
{
Console.WriteLine(copyError.Message);v
}
}
}
catch (DirectoryNotFoundException dirNotFound)
{
Console.WriteLine(dirNotFound.Message);
}
Subscribe to:
Post Comments (Atom)
Mat Table Angular
Mat Table in Angular Mat table is used to display data . its a material designed styled data-table . For using Material Table MatTableMo...
-
CriteriaOperator criteria = new BinaryOperator("Age", 30, BinaryOperatorType.Greater); CriteriaOperator criteria = CriteriaOperato...
-
SortingCollection sc = new SortingCollection(); sc.Add (new SortProperty("field on which you want to sort",DevExpress.Xpo.DB.Sorti...
-
Minification and Uglyfication in Angular Deployement Minification : While building Angular Application white spaces , unused variable , u...
No comments:
Post a Comment