Unable to safely remove a device
Safely Remove a USB key
It may happen that when trying to remove a USB device using the shortcut in the Notification area, an error displayed telling you that the device cannot be removed as it is still in use by another program.
If it is possible to identify the program, you can however close it and retry. Moreover if same not possible, you can the software Unlocker.
Download and install Unlocker.
Unlocker
Then right-click on the troubling device and select Unlocker.
A list of all the processes that are used by your device and the application locked.
It is now possible to complete this process manually or by using the buttons Unlocker.
You can safely remove the device once there is no process using this specific device.
Automate the process using a batch file
If the problem recurs frequently, you can automate the process using a batch file:
Open a new text file and copy this in:
CD% PROGRAMFILES%
CD Unlocker
Unlocker.exe X: / S
exit
Where X is the letter assigned to your device in my computer.
If it is an external hard drive with multiple partitions, then a line Unlocker.exe X: / S for each partition by changing the letter X
- Go to File> Save
- Choose the location of this file
- Give the name Unlock.bat
- Choose 'All files' in type and save the file.
Now, double click the file to unlock your device of all processes that use it now.
Additional Information
Sometimes it might be that your antivirus is scanning the USB drive.
You can cancel this option by going in your antivirus settings.