/// <summary> /// Check the working drive. Return true if settings if ok, otherwise stops the program. /// </summary> private static Boolean CheckWorkingFolder() { workingDrive = Environment.GetEnvironmentVariable("WORKING", EnvironmentVariableTarget.Machine); if (workingDrive == String.Empty || !Directory.Exists(workingDrive)) { Console.WriteLine("Working drive doesn't exist. Please get in touch with an administrator."); Console.WriteLine("Press any key to exit."); Console.ReadKey(); Environment.Exit(0); } Console.WriteLine("WORKING DRIVE: " + workingDrive + " ( " + DiskManager.GetDiskUsage(workingDrive) + "% Free )"); return(true); }
/// <summary> /// Check the backup folder. Return true if settings if ok, otherwise stops the program. /// </summary> private static Boolean CheckBackupDrive() { backupFolder = Environment.GetEnvironmentVariable("BACKUP", EnvironmentVariableTarget.Machine); if (backupFolder == String.Empty || !Directory.Exists(backupFolder)) { Console.WriteLine("Backup folder doesn't exist. Please get in touch with an administrator."); Console.WriteLine("Press any key to exit."); Console.ReadKey(); Environment.Exit(0); } Console.WriteLine("BACKUP FOLDER: " + backupFolder + " ( " + DiskManager.GetDiskUsage(backupFolder) + "% Free )"); return(true); }