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. Share path over netowrks

Share path over netowrks

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminhelp
2 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.
  • A Offline
    A Offline
    AnkushChopra
    wrote on last edited by
    #1

    I am accessing Files, folders, drives over network. Through SHBrowseForFolder I get the path over network. The problem arises when I check the path for validity with CFileFind. Assume that there is a pc with name PCabc over the network, and it has a folder in one of it's drive with name FOLDER1, which is sharable, with the same name. The path I recieve is \\PCabc\FOLDER1, Now when I pass it through CFileFind::FindFile() and CFileFind::FindNextFile(), the path is rejected. However if I take a folder say SUBFOLDER1 in the share FOLDER1 (which is also the exact name of the folder), I get no problem, ie, the path \\PCabc\FOLDER1\SUBFOLDER1 gives me no errors. It is accepted by CFileFind. Can you suggest me what should I do to get the path for the shares which will be accepted by CFileFind. Thanks

    D 1 Reply Last reply
    0
    • A AnkushChopra

      I am accessing Files, folders, drives over network. Through SHBrowseForFolder I get the path over network. The problem arises when I check the path for validity with CFileFind. Assume that there is a pc with name PCabc over the network, and it has a folder in one of it's drive with name FOLDER1, which is sharable, with the same name. The path I recieve is \\PCabc\FOLDER1, Now when I pass it through CFileFind::FindFile() and CFileFind::FindNextFile(), the path is rejected. However if I take a folder say SUBFOLDER1 in the share FOLDER1 (which is also the exact name of the folder), I get no problem, ie, the path \\PCabc\FOLDER1\SUBFOLDER1 gives me no errors. It is accepted by CFileFind. Can you suggest me what should I do to get the path for the shares which will be accepted by CFileFind. Thanks

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

      CFileFind::FindFile("\\\\PCabc\\FOLDER1\\*.*", ...); should work. If not, you'll need to step through the FindFile() code to see what it does not like.

      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