test "file exists" on remote computer?

  • Thread starter Thread starter Pete
  • Start date Start date
P

Pete

I successfully use "My.Computer.Network.DownloadFile", including the
authentication data, but I would appreciate learning how to first test
whether the file exists on the remote computer. Thanks.
- Pete
 
'Create a string for the file path
Dim strPath As String = "C:\MyDirectory\MyFile.txt"
If System.IO.File.Exists(strPath) Then
'Your Code here
End If

you can also use UNC paths as well
"\\computername\MyDirectory\Myfile.txt"
 
Thanks, but could you please tell me how the username and password get
transmitted using "System.IO.File.Exists". They were just args of
"My.Computer.Network.DownloadFile". - Pete
 
Back
Top