Network IO using Credentials
Posted
by John
on Stack Overflow
See other posts from Stack Overflow
or by John
Published on 2010-05-26T13:54:19Z
Indexed on
2010/05/26
14:01 UTC
Read the original article
Hit count: 174
Is it possible to move files from a network location that requires credentials to another network location that also requires credentials without mapping any drive. (ie: Without any use of P/Invoke)
Example:
FileInfo fi = new FileInfo(@"\\SomeComputer\SomeDrive\SomeFolder\someFile.txt");
fi.MoveTo(@"\\AnotherComputer\AnotherDrive\AnotherFolder\AnotherFile.txt");
This works fine if the source and destination network drives are already mapped but if they are not It doesn't.
© Stack Overflow or respective owner