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

  • Home
  • SEARCH
  • 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 67801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:19:00+00:00 2026-05-10T19:19:00+00:00

Is there a way, within the .net framework, to check to see if two

  • 0

Is there a way, within the .net framework, to check to see if two different shared folders are actually pointing to the same physical directory? Do directories in Windows have some sort of unique identifier? Google-fu is failing me.

(I mean, aside from writing a temp file to one and seeing if it appears in the other)

Edit: I think I’ve discovered what I need,with thanks to Brody for getting me pointed in the right direction in the System.Management namespace.

  • 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-10T19:19:01+00:00Added an answer on May 10, 2026 at 7:19 pm

    I believe using WMI queries will take care of what I need to do:

    Connection options = new ConnectionOptions(); ManagementScope scpoe = new ManagementScope('\\\\Server\\root\\cimv2', options); ObjectQuery query = new ObjectQuery('SELECT * FROM Win32_Share WHERE Name = '' + name +''')  ManagementObjectSearcher searcher = new ManagementObjectSearch(scope, query); ManagementObjectCollection qc = searcher.Get();  foreach (ManagementObject m in qc) {     Console.WriteLine(m['Path']); } 

    And the Path attribute will give me the physical path of the share, which I can use to compare the two shares.

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

Sidebar

Related Questions

Is there an easy way within C# to check to see if a DateTime
Is there any way to render ASP.net MVC controls or code directly within a
Is there a way to test code coverage within visual studio if I'm using
Is there a way to perform an HTTP GET request within a Visual Basic
Is there a way to programmatically list all geo-tagged Wikipedia entries within a radius
Is there any way i can access the page object from within the global.asax
Is there a way to get the current folder path from within a XSLT
Is there a way to identify, from within a VM, that your code is
Is there a way to detect, from within the finally clause, that an exception
Within a Foreach loop in SSIS is there a way that if a task

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.