Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

File.Move Not Moving File

$
0
0

This code is not moving my file and is not producing an error either.  If I step through the code it is producing file names for "file" but for some reason just not moving...

string[] files = Directory.GetFiles("C:\\ExcelFiles\\","*.xlsx*",SearchOption.AllDirectories);
foreach (string file in files)
{
File.Copy(file, @"\\C:\\Completed\\Excel\\");
}
}


Viewing all articles
Browse latest Browse all 31927

Trending Articles