0

I have tried to move the files between the folder in remote machine by using the IP address:

string sourcFile, destinationFile;
sourcFile = @"\\IPaddress\\Image\\IDM17-02-20-18-29.txt";
destinationFile = @"\\IPaddress\\data\\IDM17-01-03-15-36.txt";
File.Move(sourcFile, destinationFile);

but I have faced the following issue while running the code:

unknown username and bad password

How to pass the credential to connect to the remote machine ?

Derlin
  • 9,572
  • 2
  • 32
  • 53
Vengat
  • 235
  • 1
  • 5
  • 16
  • 4
    Possible duplicate of [How to provide user name and password when connecting to a network share](http://stackoverflow.com/questions/295538/how-to-provide-user-name-and-password-when-connecting-to-a-network-share) – Jurjen Mar 31 '17 at 09:16
  • The remote machine in work group, so can i used the work group name as a parameter instead of domain name. – Vengat Apr 01 '17 at 06:08

0 Answers0