Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

System.IO.File.Move "Could not find file" Exception on server-based file

$
0
0

Hi -

I am attempting, in VS2012/C#, to do a simple file move from one server location to a location on a different server:

System.IO.File.Move(origPathAndName, newPathAndName);

The value in origPathAndName originates from this action:

string[] fileNameCollection =Directory.GetFiles(sourcePath);

However, the move fails with the "Could not find file" exception seen below. Yet if I place the following in the address pane of a browser I do arrive at the PDF: \\main1bop\FTP\PINConfStmt\DEV\00014.confstmt_2013-06-24.pdf 

I've done the obvious: confirmed that the file exists, the syntax, etc. etc. and I believe if this was a permissions error it would throw a permissions-specific exception.

Any thoughts?




Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>