I had a problem with deleting files, MainFolder And SubFolders catalog. I want to delete all files, MainFolders Subfolders and after completion of the work. I am using the following code.
private void bgAtoZ_DoWork(object sender, DoWorkEventArgs e) { string Path1 = (string)(Application.StartupPath + "\\TEMP\\az\\test" + "\\" +name); StreamReader reader1 = File.OpenText(Path1); string str = reader1.ReadToEnd(); reader1.Close(); reader1.Dispose(); File.Delete(Path1); }
If someone has helped me, I would be fine. Thanks in advance...
source share