I want to find out a given drive path is mapped drive or normal drive in my Java code. Is there any API already available for that?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could probably use WMI for this, either use a WMI library for Java, or call
wmic.exe. Looks to be a fairly simple query,Select * From Win32_LogicalDisk Where DriveType = 4As a reference: http://blogs.technet.com/b/heyscriptingguy/archive/2005/10/27/how-can-i-determine-which-drives-are-mapped-to-network-shares.aspx