Get Files from Network Path

K

Keith Kowalski

I am trying to get the # of current Files in a specific directory

I can get it fine if the path is simular to "C:\windows", But not if it is a
network path like \\Servername\Directory

How can I do this? Or where can I llok to find this information.

Here is the code I have.................................
Dim oDir As System.IO.Directory

Dim ss As String() = oDir.GetFiles(s2) 's2 = Directory name from
Database

If ss.Length > Trim(s3) Then 's3 = File Count From
DataBase

MsgBox("DSend Mail") 'Display msgbox if Files
in directory are greater than File count number from Databasse



Thanks in advance for your help....

KEith
 
G

Guest

If you have the correct permissions, you shouldn't to have problems with the
network directories.

I have used your code to local and network directories without problems.

Kind Regards,

Jorge Serrano
MVP VB.NET
 
K

Keith Kowalski

Jorge,
I tracked it down and it looks like I mistyped the directory. I added a
catch for this and now the problem is solved.
Thank you for taking the time to verify that my code did work.

Keith

"Jorge Serrano [MVP VB]"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top