public static bool assertAccessDB() { try { //asserts the file exists if (File.Exists(path + "VDI.accdb")) { result = true; Console.WriteLine("Access file saved as: " + fileName); } } catch (Exception e) { Console.WriteLine("Error " + e.Message); } try { Available.DeleteAllFilesInPath(path); } catch (Exception e) { Console.WriteLine("Error " + e.Message); } return(result); }
/// <summary> /// searches for all the permited formats and delete those files. /// </summary> public static bool CheckZip(string zip) { if (File.Exists(zip)) { Available.DeleteAllFilesInPath(path); return(true); } else { return(false); } }
public static bool assertWordDoc() { try { //asserts the file exists if (File.Exists(path + "VDI.docx")) { result = true; Console.WriteLine("Word file saved as: " + filename); Available.DeleteAllFilesInPath(path); } }catch (Exception e) { Console.WriteLine("file " + filename + " not found"); } return(result); }
public static bool assertExcel() { try { //asserts the file exists if (File.Exists(path + "VDI.xlsx")) { result = true; Console.WriteLine("Excel file saved as: " + fileName); } Available.DeleteAllFilesInPath(path); } catch (Exception e) { Console.WriteLine("Excel file " + fileName + " not found"); } return(result); }
public static bool assertPowerPoint() { try { //asserts the file exists if (File.Exists(path + "VDI.pptx")) { result = true; Console.WriteLine("PowerPoint file saved as: " + fileName); } Available.DeleteAllFilesInPath(path); } catch (Exception e) { Console.WriteLine("Assert PowerPoint Failed: " + fileName + "\n" + e.Message); } return(result); }