Detecting bad sectors and aborting format process. Thanks to ALL that may have suggestions. Now, detecting whether the disk had bad sectors will be trickier. You just might be able to check the errorlevel to do that. Errorlevel 4 is returned for fatal errors, I dont know if this would work on just bad sectors or not.
Some experimentation reveals a couple things.
But, it looks like autotest DOES at least mark bad sectors as bad. Hope this helps. Providing a Y or N responds as needed. Detecting bad sectors and aborting format process. Thanks to ALL that may have suggestions.