Filename to URL? 
Author Message
 Filename to URL?

Is there a filename to URL function?  Ie. can I convert a filename like
"C:\WINNT\NOTEPAD.EXE" to "\\SERVERNAME\C\WINNT\NOTEPAD.EXE" ?

Thanks!

Brian



Tue, 13 Sep 2005 04:16:52 GMT  
 Filename to URL?
WNetGetConnection(_T("C:\\WINNT\\NOTEPAD.EXE"), ...)


Quote:
> Is there a filename to URL function?  Ie. can I convert a filename like
> "C:\WINNT\NOTEPAD.EXE" to "\\SERVERNAME\C\WINNT\NOTEPAD.EXE" ?

> Thanks!

> Brian



Tue, 13 Sep 2005 16:40:56 GMT  
 Filename to URL?
Does a socket have to be connected before I use this function?  I'm getting
an "Invalid Device Name" value after calling WNetGetConnection().  However,
the string I pass in comes directly from a CFileDialog() object selection
and I looked at the string and it looks fine.

Thanks,
Brian



Quote:
> WNetGetConnection(_T("C:\\WINNT\\NOTEPAD.EXE"), ...)



> > Is there a filename to URL function?  Ie. can I convert a filename like
> > "C:\WINNT\NOTEPAD.EXE" to "\\SERVERNAME\C\WINNT\NOTEPAD.EXE" ?

> > Thanks!

> > Brian



Tue, 13 Sep 2005 17:12:28 GMT  
 Filename to URL?
WNetGetConnection() simply converts "C:" to \\server\share.  You'll have to
append the folder(s) and filename to the UNC.


Quote:
> Does a socket have to be connected before I use this function?  I'm
getting
> an "Invalid Device Name" value after calling WNetGetConnection().
However,
> the string I pass in comes directly from a CFileDialog() object selection
> and I looked at the string and it looks fine.

> Thanks,
> Brian



> > WNetGetConnection(_T("C:\\WINNT\\NOTEPAD.EXE"), ...)



> > > Is there a filename to URL function?  Ie. can I convert a filename
like
> > > "C:\WINNT\NOTEPAD.EXE" to "\\SERVERNAME\C\WINNT\NOTEPAD.EXE" ?

> > > Thanks!

> > > Brian



Tue, 13 Sep 2005 19:10:22 GMT  
 Filename to URL?
I'm still a bit puzzled.  It's giving me a "NOT_CONNECTED" error.  What does
this mean?  I know I have my "C" drive mapped on the network.  What am I
doing wrong?



Quote:
> WNetGetConnection() simply converts "C:" to \\server\share.  You'll have
to
> append the folder(s) and filename to the UNC.



> > Does a socket have to be connected before I use this function?  I'm
> getting
> > an "Invalid Device Name" value after calling WNetGetConnection().
> However,
> > the string I pass in comes directly from a CFileDialog() object
selection
> > and I looked at the string and it looks fine.

> > Thanks,
> > Brian



> > > WNetGetConnection(_T("C:\\WINNT\\NOTEPAD.EXE"), ...)



> > > > Is there a filename to URL function?  Ie. can I convert a filename
> like
> > > > "C:\WINNT\NOTEPAD.EXE" to "\\SERVERNAME\C\WINNT\NOTEPAD.EXE" ?

> > > > Thanks!

> > > > Brian



Wed, 14 Sep 2005 01:02:07 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How can I convert short filenames to long filenames

2. Long Filenames from 8.3 Filenames

3. Extracting Long Filename from dos filename ??

4. How to get long filename with short filename ?

5. Long filename to short filename

6. Get long filename from 8.3 filename

7. Long Filenames from 8.3 Filenames

8. accessing filename and changing filename

9. How to get long filename with short filename ?

10. CGI: Get an URL and Post to an URL

11. May I throw a URL string to IE and launch the URL externally?

12. May I throw a URL string to IE and launch the URL externally?

 

 
Powered by phpBB® Forum Software