Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 42165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:17:43+00:00 2026-05-10T15:17:43+00:00

Suppose you have a full path to an accessible file or folder on the

  • 0

Suppose you have a full path to an accessible file or folder on the system. How can I get some kind of unique identifier for the physical device that the file (or folder) actually resides on?

My first attempt was to use System.IO.DriveInfo which depends on having a drive letter. But UNC paths and multiple network drives mapped to the same physical device on a server add some complications. For example these 3 paths all point to the same folder on the same device.

\\myserver\users\brian\public\music\ s:\users\brian\public\music\          (here s:\ is mapped to \\myserver\) u:\public\users\music\                (here u:\ is mapped to \\myserver\users\brian\) 

Ultimately my goal is to take these multiple paths and report the amount of used and free disk space on each device. I want to combine these 3 paths into a single item in the report and not 3 separate items.

Is there any Windows API that can help find this information given any arbitrary full path?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:17:44+00:00Added an answer on May 10, 2026 at 3:17 pm

    This win API call should get you what you need regarding disk space

      GetDiskFreeSpaceEx 

    http://msdn.microsoft.com/en-us/library/aa364937(VS.85).aspx

    Also, to determine if the three mappings all are from the same physical disk, perform a call to

    GetVolumeInformation 

    and compare the returned volume serial numbers

    http://msdn.microsoft.com/en-us/library/aa364993(VS.85).aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose you have some <div> s: <div id=div_num1></div> <div id=div_num2></div> <div id=div_num3></div> You can
Suppose I have an SQL file commands.sql full of SQL commands. The intention is
Suppose I have a table with full-text index on column Firstname, lastname, email. There
I need to get to the full path of mono because it seems things
Suppose there are only two type of model objects. Tag Article Article can have
Suppose you have files like: NewFile.part01.zip NewFile.part02.zip NewFile.part04.zip NewFile.part06.zip NewFile.part07.zip How do you get
Suppose you have a large file made up of a bunch of fixed size
Suppose I have a set of commits in a repository folder... 123 (250 new
I am working in android. i want to get the full path of a
Suppose I have variables dir and file containing strings representing a directory and a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.