using System; //using System.Management; class format { // public static void Disk() // { // string disk; // disk = "C"; // ManagementObject diskSize = new ManagementObject("win32_logicaldisk.deviceid=\"" + disk + ":\""); // diskSize.Get(); // } public static void Main() { Console.WriteLine(); Console.Write("C:\\>"); System.Threading.Thread.Sleep(500); Console.Write("format c: /FS:NTFS"); Console.WriteLine(); System.Threading.Thread.Sleep(250); Console.WriteLine("The type of the file system is NTFS."); Console.WriteLine(); Console.WriteLine("WARNING, ALL DATA ON NON-REMOVABLE DISK"); Console.WriteLine("DRIVE C: WILL BE LOST!"); Console.Write("Proceed with Format (Y/N)? "); System.Threading.Thread.Sleep(1000); Console.Write("Y"); System.Threading.Thread.Sleep(250); Console.WriteLine(); Console.Write("Verifying 16370M"); Console.WriteLine(); Console.WriteLine(); Console.WriteLine("Format cannot run because the volume is in use by another"); Console.WriteLine("Process. Format may run if this volume is dismounted first."); Console.WriteLine("ALL OPENED HANDLES TO THIS VOLUME WOULD THEN BE INVALID."); Console.Write("Would you like to force a dismount on this volume? (Y/N) "); System.Threading.Thread.Sleep(1000); Console.Write("Y"); System.Threading.Thread.Sleep(250); Console.WriteLine(); Console.WriteLine(); Console.Write("NTFS Quick Formatting drive C: on VOLUME."); Console.Write("."); System.Threading.Thread.Sleep(250); Console.Write("."); System.Threading.Thread.Sleep(100); Console.Write("."); System.Threading.Thread.Sleep(800); Console.Write("."); System.Threading.Thread.Sleep(600); Console.Write("."); System.Threading.Thread.Sleep(400); Console.Write("."); System.Threading.Thread.Sleep(300); Console.Write("."); System.Threading.Thread.Sleep(100); Console.Write(" DONE"); Console.WriteLine(); string input = ""; while(input!="quit") { Console.Write("c:\\>"); input = Console.ReadLine(); Console.Write("{0} is not recognized as an internal or external command,", input); Console.Write("operable program or batch file."); Console.WriteLine(); } Console.WriteLine(); } }