Diskettes are almost universally reviled for being too slow and too small, yet almost everyone depends on them for backing up individual files and sharing data among computers. But formatting them is a chore. You have to open Explorer, then navigate to the floppy drive, and choose the Format command from a menu. This is where a batch file can come in handy.
If you just want to format a disk, fire up Notepad and type format a: /autotest (type b: instead of a: if that's the drive you want to use). Save the file to a desired folder as something like fmt.bat, making sure to use the three-letter .bat extension. (I keep a separate folder just for batch files.) But be warned: The /autotest switch tells DOS to format a floppy disk without prompting you for confirmations. If you accidentally execute this batch file on a floppy containing data, use the DOS Unformat command to reverse the dire effects. Unfortunately, this rescue technique works only with Windows 3.x and DOS 6.x. If you use Windows 9x, look for the file mirror.com on your hard disk. You may have to dig out your old DOS floppies and find a file called mirror.co_. Start a DOS window (choose Start-Programs-MS-DOS Prompt), and at the C: prompt, type expand a:\mirror.co_ c:\dos\mirror.com (your path may differ), and then press
Note that this batch file won't work with NT, nor will it allow for quick formatting. To overcome these limitations, change the format line to format a: /q
If you're not using NT, you can include the mirror line as before. Save and close the file. Now right-click an empty area of the folder identified in the command line (here, it's the Windows folder) and choose New-Text Document. Name it cr.txt. Double-click the new file to open it for editing. Press
If you prefer to see the normal Windows Format dialogue box (Windows 9x and NT only), right-click the Start button and click Open or Explore. Double-click Programs, then navigate to the folder from which you'd like to launch the formatter. Right-click an empty area and choose New-Shortcut. In the Command Line box, type rundll32.exe shell32.dll,SHFormatDrive, taking note of the lowercase/uppercase letters. Click Next and type a name for your Shortcut (such as Floppy Formatter). Click Finish. If you want, you can assign a keyboard shortcut to launch this formatter: Right-click the new icon, select Properties, click the Shortcut tab, then click in the Shortcut key field and type a letter or number. The system will automatically add "Ctrl + Alt +" to what you type, and that key combination will be your keyboard Shortcut. Whenever you want to format a floppy, just choose your new command from the Start menu or press its keyboard Shortcut.