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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting an error with .GetFiles

Status
Not open for further replies.

qwert231

Programmer
Sep 4, 2001
756
US
Here's my code:
Code:
Dim path As String = "Y:\Jobs2\" & job1.Text & "\"
Dim di As New DirectoryInfo(path)
Dim File As FileInfo

For Each File In di.GetFiles("*.jpg")
 ListBox1.Items.Add(File.Name.ToString)
Next

And I get this error:
System.IO.DirectoryNotFoundException: Could not find a part of the path "Y:\Jobs2\000111".


Y: is a mapped directory. Is this still the same 'ASP.Net doesn't like UNC or mapped paths'? There has to be some way around this... There are many things I need to read from other servers...

I don't have much time to spend on this As I am getting married this weekend, and will only be working part of the week. Then I will be off all next week.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top