public static void DeleteFileList() { foreach (string str in _fnamelist) { try { RecycleBin.DeleteFile(str); } catch { } } _fnamelist.Clear(); }
public static void DeleteDirectory() { foreach (string str in _dirslist) { try { if (Directory.Exists(str)) { RecycleBin.DeleteDir(str); } } catch { } } _dirslist.Clear(); }
public static void DeleteFile(string fpath) { RecycleBin.DeleteFile(fpath); _fnamelist.Remove(fpath); }