Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'm using a Flash drive in DOS, and frequently remove it when the system is running (Although not reading or writing from/to the device). I have read on here that the device shouldn't be removed with the system powered up. I can understand this in Windows, but is this still the case in DOS, if so, I would appreciate an explaination.
Thanks,
Ik.

Q. Are USB flash drives intended to be hot-swappable (i.e. you can plug one in, or remove it, with the computer already on)?
A. The USB interface standard was created with the hot-swappable feature in mind. Any USB device can be inserted or extracted while the computer is on. This applies to USB flash drives as well.
Ref: http://www.usbflashdrive.org/usbfd_faq.html

Thanks very much.
Many people say that it's a no-no, although like many things, they say smoething because they heard it on the grapevine, and believe it themselves without any evidence to substanciate ito, or even bothering to investigate themselves.

I think this may be a gray area. There use to be a problem with floppies with the FAT and directories not being written properly if the application/OS not closing the files and flushing the buffers. Way back I think with CPM you used a ctrl-C to flush the buffers and reload the directories when you change the disk.
I think you should try by having several USB storage devices and swap them at various different times. If you have a network you should try sharing the files and or folders.
The design was to be hot swappable, but DOS was not.

I would agree with wizard-fred that under
MS DOS hot swapping would not be supported.Quality driver software even includes
add/remove USB device safely ICON for use
under Windows 98SE, so if they feel that
devices need to be stopped under a
multi-tasking O/S, then would presume that
would be the case under a single tasking
O/S. I believe with the DUSE USB DOS
driver you can load/unload the TSR from
the command line.As Panasonic still seem to be developing
their DOS USBASPI driver contact them ??

I doubt that the manufactures of USB products have tested hot swapping under DOS. As to the risk of losing data or corrupting the FAT16 tables, it would depend on what version of DOS and if you are using some sort of disk cache software and how it is set.
When SMARTDRV (and the like) were introduced to speed up disk drive, diskette and C-Rom, they introduced "write behind" disk caching. This became a problem with floppies and removable drives. Buffers were not being written out before disks were removed sometimes. Windows had the same problem. To get around it, they introduced the current method where you stop the drive.
Under DOS, its not that easy to support. Somewhere along the line (DOS 5.00 or one of its updates if I recall), code was added to DOS to command disk caching programs such as SmartDRV to write out its "write behind" buffers before returning to the DOS prompt.
So with DOS 6.22, as long as the DOS prompt is showing (no programs running) it should be safe to unplug a USB device with power on.
The caveat here is that you are using DOS programs like SmartDRV and not some other product to do disk caching and you do not have a background TSR type program that is writing to the device.

However, there is a very high risk of data corruption if the flash device is unplugged and a different mass storage device is plugged in.
The Panasonic USBASPI driver + DI1000DD.SYS just do not recognize the mass storage device as removable.
You can use DEVICE.COM (like those from QEMM) to load/unload the drivers from the command line...

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |