USB Drive Unmount Command


Stan Brown

You mean you do that on some Linux/Unix host
Thank you for telling me what I mean, but you're mistaken. For one
think, this is a Windows newsgroup, so why would I be talking about
UNIX without making it clear I was doing that? And if I were,
wouldn't I have said "script" rather than "batch file"?

It's a subtle distinction, I know, but I said "the unmount command"
and not "the 'unmount' command". Take a look at the subject line.

The actual command, as it happens, is

USB_Disk_Eject /showeject /removeletter K

Stan Brown

I think Stan's looks
like it will do the job too.
It works quite well for me, and when I use it I never get the Windows
"Scan and fix" prompt the next time I connect the USB drive.
I was really just pointing out to Roger that Gene had asked (and
Roger had quoted!) for a way that would work in a batch file, and
Roger had suggested using an icon.
My objection to icons is simple: I'm not very good with a mouse, so I
don't like operations that depend on very precise mouse movements.
I'm forever locking Windows instead of logging off, because after
clicking Start I click just a bit to the left of the arrow that lets
me select six actions.


Has anyone had a problem?
Yes! If you change the properties of a USB-attached drive to enable "lazy
writing," and yank out the plug you may lose data. The default is for
"Quick Removal" which always completes writes. Be careful if you change
it to get higher performance. And you do - it may not mean much for a
thumb drive, but a disk is a different animal.I have an external, USB3
hard drive. In Quick Removal mode writes run at about 32MB/s. In buffered
mode it is closer to 90.

Zaphod Beeblebrox

Over all the years of using either a USB HDD or a USB Pen drive I have
never unmounted it before pulling the plug on either and have never had
any problems. This on XP and Vista and Windows 7.
Has anyone had a problem?
I have on a couple of occasions under XP, which is why I now *always*
unmount before unplugging removable media.

Gene Wirchenko

Does anyone know of a command for unmounting a USB drive? I
frequently copy from system to system using batch files, and I would
like it if the drive could be unmounted at the end of the batch file.
Paul <[email protected]> suggested

I went with this one. It is CLI-friendly. The response comes
back to the CLI window, and it apparently -- I did not try this -- has
return codes.


Gene Wirchenko

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question