Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you use UNC path names for FileListBox?

Status
Not open for further replies.

robbaggio

Programmer
Jun 11, 2002
31
US
Ok, here is the situation. I parse from a file a list of UNC directory names for various locations. I add these directories to a combobox. This all works fine. Then when i select one of the directories from the combobox i want the UNC path name to be displayed in a Textbox, which works fine, and then change the path of the FileListBox accordingly so the FileListBox displays the contents of that directory(this is where the problem comes).

Right now in the change method for the textbox i have the line:
FileBox1.Path = TextBox1.Text

This usually works for me, but i get an invalid path. I think it may have a problem with UNC names (an example of one of the directories would be like: //games.mydomain.com/code/files

How can I use UNC names? I really cant use mapped drives instead because this will need to work for everyone on a network,and they may have mapped to different drive, or not even mapped at all.

Any help would be greatly appreciated. If you need anymore info let me know.

Thanks again
robbaggio
 
I use this in an application and it works just fine.

Source= "\\torcom01\sys\lasonnyc\"
File1.Path = Source

Good luck
 
Thanks for trying but that still doesnt work for me, still get path not found error.

Tried:
Source = "\\server.domain.com\dir1\dir2\"
File1.Path = Source

Any other ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top