Is there a way to eject/safely remove multiple drives (ie flash drives) at once on Windows? That is, without having to click on each one and then clicking "eject"? Could this be done with a batch file?
3 Answers
it is possible that you don't need to click Safely Remove Hardware
icon again and again.
One thing you can do is setup your device not to cache data in the computer, so that whenever the transfer is complete, it should be perfectly complete not required to write it down first while ejecting the drive.
To set this up:
- Open Device manager
- Click on the USB Drive device
- Right click on it
- Select
Properties
In the Policy
tab,
- Select the
Quickly Remove
option (This will make your transfer slightly slower but it will be safe to remove your drive) - Make sure the copy/move task has completed
See full process here: How to Remove USB drive quickly without any Risk
RemoveDrive can be used from a batch file:
You can use drive letters or "friendly names". If you want to make the batch file truly generic you can copy the exe (it's really small) to all your removable drives. Then you can simply loop through all drive letters and if RemoveDrive.exe exists execute it using removedrive \
(which will eject the drive the exe is on). Better still, you can loop through and eject only mounted devices using the batch file I posted here.
You could use usb-disk-ejector. The usb-disk-ejector is open source and does this also.
USB_Disk_Eject.exe /REMOVELETTER D