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 8926991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:07:07+00:00 2026-06-15T08:07:07+00:00

How can I convert a path like \Device\HarddiskVolume3\Windows into its corresponding virtual path? (like

  • 0

How can I convert a path like

\Device\HarddiskVolume3\Windows

into its corresponding virtual path? (like c:\Windows in this case)

  • 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. Editorial Team
    Editorial Team
    2026-06-15T08:07:08+00:00Added an answer on June 15, 2026 at 8:07 am

    Personally I prefer the native way:

    function GetHDDDevicesWithDOSPath:TStringlist;
    var
      i: integer;
      root: string;
      device: string;
      buffer: string;
    begin
      setlength(buffer, 1000);
      result:=TStringlist.create;
      for i := Ord('c') to Ord('z') do
      begin
        root := Char(i) + ':';
        if (QueryDosDevice(PChar(root), pchar(buffer), 1000) <> 0) then
        begin
          device := pchar(buffer);
          result.add(format('%s = %s\',[device, root ]));
        end;
      end;
    end;
    

    NB: This code sample is taken from: http://www.delphipraxis.net/165249-auflistung-devices.html

    This will return a map between logical drive and path. In my case:

    \Device\HarddiskVolume2 = c:\
    \Device\HarddiskVolume3 = d:\
    \Device\IsoCdRom0 = e:\
    \Device\CdRom0 = f:\
    \Device\hgfs\;Z:0000000000084af9\vmware-host\Shared Folders = z:\
    

    You have to replace “\device\harddisk” part in your path with coresponding drive letter.

    Please, note drive letters are user dependent.
    Some useful links:

    • Defining an MS-DOS Device Name
    • Naming Files, Paths, and Namespaces
    • coverting physical drive to logical drive how to?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

You can convert a negative number to positive like this: int myInt = System.Math.Abs(-5);
I convert small html strings to pdf like this: // set a path to
How can you convert a drive relative path such as D:test.xml into an absolute
I'm trying to convert ~/Uploads/Images/ to an absolute path I can create a FileStream
Simple case of trying to prove I can convert NSString to NSDate . Create
How do I convert a path with a drive letter like W:\Path\Share to the
Using ASP.NET how can I convert a absolute path to a relative client path?
PHP has a nice realpath() function, which can convert something like /dir1/dir2/../dir3/filename to /dir1/dir3/filename
Solved using this post: Can you convert an ASP.NET MVC Application to a Web
I am handling with a Wikipedia-like project. I can convert the text file to

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.