Problem with Getfiles and Login Information on the source pc.
Was this post helpful ?
I am using the following code to get a list of filenames from a directory on a pc on our network.
Dim query As String
Dim x As New System.IO.DirectoryInfo("\\shipping\ShippingC\KEWILL\CSWIN\ARCHIVE")
'Dim x As New System.IO.DirectoryInfo("C:\KEWILL\CSWIN\ARCHIVE")
Dim s() As System.IO.FileInfo = x.GetFiles("*.cs")
Dim a As New ArrayList
Dim tn As TreeNode
tn = New TreeNode("Dayfiles")
TreeView1.Nodes.Add(tn.Clone)
For Each dayfile As System.IO.FileInfo In s
tn = New TreeNode(dayfile.ToString)
'tn.Nodes.Add(dayfile.ToString)
TreeView1.Nodes.Add(tn.Clone)
Next
Everything works fine as long as I log into the pc manually, by using explorer, before running the app. Is there anyway I can pass the username/password in the getfiles funtion (or elsewhere) so that it will log into the pc properly on it own.
John