-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
> The file system shouldn't mater. It should work with FAT32 #37
Comments
It works with your NTFS partition? What is your OS version? |
I am using Windows 10 operating system. The java program successfully detects USB Pen drive or a Memory Card. |
In windows you are querying with drivetype 2 which is for removable disks, however, windows are classifying external hard disk as drivetype 3 (as a regular hard disk). I guess that's the reason your program isn't detecting external hard disk connected to windows. However, I checked on OSX, it is able to detect as removable disk. |
Are you planning to fix this for Windows? |
yes, I'll try |
Because it is classifying your external hard disk as a regular hard disk, I don't know exactly how should we distinguish between this external disk and the computer's default hard disk. Do you have any idea how to do it? If we don't find a way to distinguish in those cases, I guess I can find a way to configure which types we want to look for. |
@sashi2k Did you test this with the latest Win10? Because i just tried this with my fat32 formatted usb stick and wmic.exe reports it as DriveType 2.
(C-F are normal NTFS drives, G is a NTFS formatted USB stick, H is a FAT32 formatted USB stick) |
I was looking at using the library for a pet project and ran into the same issue. Here is my wmic output:
"F:" ie "SABRENT SCSI Disk Device" is the removable drive. It is mounted in a USB external enclosure. Did a little digging in the code and online to see if I could find a solution. According to This superuser post:
I tried to find a primary source from windows for how type detection is done but turned up empty-handed. The best I could find is the overview docs from Microsoft. LogicalDisk,DriveType,RealDriveType So I think either the drive self identifies or windows decides based on whatever internal factors the devs over there thought were good enough. I don't see any way to (using these utilities) detect an external hard drive. At least not if Windows itself is not identifying the drive as such. I am going to adopt a different solution for my project but I thought this dive might be useful. Cheers! |
My NTFS hard disk DriveType 3 is not picked up. We use USB external hard disk to transfer stuff. However while doing some testing the api picks up USB memory sticks (DriveType 2) just fine. Our NTFS formatted USB harddisk however (DriveType 3) is not picked up at all. Is |
Testing the same code on a Linux it picks up the external Hard drive just fine. So Windows is the problem here it seems. |
It is not detecting. I have an external hard disk with NTFS partition. I created one FAT32 partition. When I plugin the hard disk and run the Java program, it does not show the external hard disk.
Originally posted by @sashi2k in #36 (comment)
The text was updated successfully, but these errors were encountered: