//copy directoris tree and save new empty directory public void work() { using (var fbd = new FolderBrowserDialog()) { DialogResult result = fbd.ShowDialog(); if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(fbd.SelectedPath)) { string destinationpath = @"C:\Users\pandey\Desktop\delet"; bool tgle = true; Directorytree.DirectoryCopy(fbd.SelectedPath, destinationpath, tgle); // System.Windows.Forms.MessageBox.Show("Files found: " + files.Length.ToString(), "Message"); } } }
private void button3_Click(object sender, EventArgs e) { //if if (SourceDirectory == string.Empty) { //Message Box and Return MessageBox.Show("Pls Select Source Directory"); return; } if (DestinationDirectory == string.Empty) { //Message Box and Return MessageBox.Show("Pls Select Destination Directory"); return; } Directorytree.DirectoryCopy(SourceDirectory, DestinationDirectory, true); MessageBox.Show("Generated"); // Message Box directoryTree generated }