_findfirst() can't see host on LAN
-
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
-
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
This form should work: \\computername\sharename\pathrelativetoshare\filenameorwildcards Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
-
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
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
-
This form should work: \\computername\sharename\pathrelativetoshare\filenameorwildcards Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
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
-
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
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