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
 

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

Back
Top