Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to check if 2 network shares are the same folder.

How to check if 2 network shares are the same folder.

Scheduled Pinned Locked Moved C / C++ / MFC
sysadmintutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Green Fuze
    wrote on last edited by
    #1

    Assume the following: In a computer called COMPUTER there is the following folder: c:\folder1\folder2 Now, there are 2 shares: \\COMPUTER\NetFolder2 --> which is c:\folder1\folder2 \\COMPUTER\NetFolder1 --> which is c:\folder1 Now, I can get to through the network to "folder2" in 2 different ways: \\COMPUTER\NetFolder2 \\COMPUTER\NetFolder1\folder2 Is there a way to check that \\COMPUTER\NetFolder2 is the same as \\COMPUTER\NetFolder1\folder2 ??? Thanks! :-)

    D 1 Reply Last reply
    0
    • G Green Fuze

      Assume the following: In a computer called COMPUTER there is the following folder: c:\folder1\folder2 Now, there are 2 shares: \\COMPUTER\NetFolder2 --> which is c:\folder1\folder2 \\COMPUTER\NetFolder1 --> which is c:\folder1 Now, I can get to through the network to "folder2" in 2 different ways: \\COMPUTER\NetFolder2 \\COMPUTER\NetFolder1\folder2 Is there a way to check that \\COMPUTER\NetFolder2 is the same as \\COMPUTER\NetFolder1\folder2 ??? Thanks! :-)

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Does PathIsSameRoot() help?

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "Man who follows car will be exhausted." - Confucius

      G 1 Reply Last reply
      0
      • D David Crow

        Does PathIsSameRoot() help?

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "Man who follows car will be exhausted." - Confucius

        G Offline
        G Offline
        Green Fuze
        wrote on last edited by
        #3

        Hey, Thanks for your help! :-) No it doesn't help... Well, I am happy to say that I just found out that Boost library can do that using boost::filesystem::equivalence() function. But my main problem still remains... How to tell that NetFolder1 is NetFolder2's parent? (it is possible to iterate all the shared directories and create a data structure that will hold that data, but when there are many shared folders, it is almost insane!) Thanks Again!!!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups