private bool IsADirectory(string folder) { if (Directory.Exists(folder)) return true; else return false; }