by Benjamin Cordingley (1 Submission)
Category: Files/File Controls/Input/Output
Compatability: VB Script
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (3 Votes)
This code is a demonstation on how to format a floppy with out using format.com and with out calling the SHFormatDrive API. This code allows you to format a floppy without a popup window. Currently it is set for 1.44mb only, but all the code is there if you want to play around with 702kb and 2.88mb. From what i understand this code only works on NT based systems.
Side Effects
One side effect if you do not close the handle is your floppy will become unresponive till reboot. in other words...be sure to close the handle.
API DeclarationsGetVolumeInformation
CreateFile
ReadFile
CloseHandle
SetErrorMode
SetFilePointer
WriteFile
FlushFileBuffers
DeviceIoControl
LockFile
UnlockFile
Download Floppy Disk Format (5 KB)