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. _findfirst() can't see host on LAN

_findfirst() can't see host on LAN

Scheduled Pinned Locked Moved C / C++ / MFC
c++sysadminhelp
5 Posts 3 Posters 6 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.
  • R Offline
    R Offline
    Robert Palma Jr
    wrote on last edited by
    #1

    Using Visual C++ 6.0 I need my app to scan (with wildcard) files on another Workgroup computer on the LAN. Network Neighborhood finds and reads the other computer's drive just fine. I am unclear about the syntax to use to see the other computer's drive. The other computer's "name" is: Music1 Music1 shares it's c drive as: Music1_C I have placed a text file, a.txt at the c drive root of Music1. I have tried to get _findfirst() to see it - to no avail. None of these work: \\Music1\c:\a.txt \\Music1\c$\a.txt Music1_c\a.txt Interestingly, the only one of these that work from the Windows command line is: \\music1\c$\a.txt Any help is much appreciated. :) Robert

    M D 2 Replies Last reply
    0
    • R Robert Palma Jr

      Using Visual C++ 6.0 I need my app to scan (with wildcard) files on another Workgroup computer on the LAN. Network Neighborhood finds and reads the other computer's drive just fine. I am unclear about the syntax to use to see the other computer's drive. The other computer's "name" is: Music1 Music1 shares it's c drive as: Music1_C I have placed a text file, a.txt at the c drive root of Music1. I have tried to get _findfirst() to see it - to no avail. None of these work: \\Music1\c:\a.txt \\Music1\c$\a.txt Music1_c\a.txt Interestingly, the only one of these that work from the Windows command line is: \\music1\c$\a.txt Any help is much appreciated. :) Robert

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      This form should work: \\computername\sharename\pathrelativetoshare\filenameorwildcards Mark

      "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

      R 1 Reply Last reply
      0
      • R Robert Palma Jr

        Using Visual C++ 6.0 I need my app to scan (with wildcard) files on another Workgroup computer on the LAN. Network Neighborhood finds and reads the other computer's drive just fine. I am unclear about the syntax to use to see the other computer's drive. The other computer's "name" is: Music1 Music1 shares it's c drive as: Music1_C I have placed a text file, a.txt at the c drive root of Music1. I have tried to get _findfirst() to see it - to no avail. None of these work: \\Music1\c:\a.txt \\Music1\c$\a.txt Music1_c\a.txt Interestingly, the only one of these that work from the Windows command line is: \\music1\c$\a.txt Any help is much appreciated. :) Robert

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

        Robert Palma Jr. wrote:

        None of these work: \\Music1\c$\a.txt

        But have you tried: \\\\Music1\\c$\\a.txt


        "A good athlete is the result of a good and worthy opponent." - David Crow

        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

        R 1 Reply Last reply
        0
        • M Mark Salsbery

          This form should work: \\computername\sharename\pathrelativetoshare\filenameorwildcards Mark

          "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

          R Offline
          R Offline
          Robert Palma Jr
          wrote on last edited by
          #4

          Thanks Mark, My big "whoops" was that I was searching for \nul rather than *.* or some exact filename. the \nul is an old DOS technique to search for the nul file in a directory, which means you are just looking for the existance of the directory itself. Again thanks, it all works now :-) Yup, mnay years programming in DOS .... will be 59 next month. All the best, Robert

          1 Reply Last reply
          0
          • D David Crow

            Robert Palma Jr. wrote:

            None of these work: \\Music1\c$\a.txt

            But have you tried: \\\\Music1\\c$\\a.txt


            "A good athlete is the result of a good and worthy opponent." - David Crow

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            R Offline
            R Offline
            Robert Palma Jr
            wrote on last edited by
            #5

            Thanks David, My big "whoops" was that I was searching for \nul rather than *.* or some exact filename. the \nul is an old DOS technique to search for the nul file in a directory, which means you are just looking for the existance of the directory itself. Again thanks, it all works now :-) Yup, mnay years programming in DOS .... will be 59 next month. You have posted relies to my questions in the past. I hope all is very well with you :-) All the best, Robert

            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