I'm attempting to use File.Move to move a file from one UNC location to another.  This blows up if the UNC path for the destination happens to be the local machine (error: Access to the path is denied).  Example File.Move(@"\\someServer\path\file.txt", @"\\blah2\somewhere\file.txt").  This assumes there's a network share out there somewhere named \\someServer and my local machine name is blah2.  Change \\blah2 to C:\ and all is good.
Maybe it's a typo, but shouldn't it be @"\\blah2\somewhere\file.txt", i.e. with two backslashes?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With