all groups > dotnet windows forms > february 2005 >
You're in the

dotnet windows forms

group:

DirectoryInfo not working



DirectoryInfo not working G Dean Blake
2/26/2005 5:28:40 PM
dotnet windows forms: the following code has a valid string in Session("ScannedInvoicedDirectory")
which is \\Machine1\c\InvoiceScans. In fact I can put that string into file
explorer and it scans to the directory on the other machine sucessfully.
but rootdi.exists is false. This code used to work. What could be wrong?

Thanks,
G

Dim rootdi As DirectoryInfo = New
DirectoryInfo(Session("ScannedInvoicesDirectory"))
If Not rootdi.Exists Then
lblError.Text = "Scanned Directory" &
Session("ScannedInvoicesDirectory") & "does not exist"
Exit Sub
End If

Re: DirectoryInfo not working Bernie Yaeger
2/26/2005 10:13:19 PM
Hi Dean,

It appears that directoryinfo does not recognize UNC. On the local machine,
I assumen "c:\invoicescans" works fine.

HTH,

Bernie Yaeger

[quoted text, click to view]

Re: DirectoryInfo not working Chris Dunaway
3/1/2005 6:53:39 AM
Just a shot in the dark, but shouldn't the path include a $ sign?

\\machine1\c$\InvoiceScans
AddThis Social Bookmark Button