private bool TryDeleteFile(string name, string folder) { string path = Path.Combine(folder, name); if (!File.Exists(path)) { return false; } try { File.Delete(path); } catch { return false; } return true; }