1

I'm writing a program using C# that renames some files and uploads to my WD MyCloud media share (runs a Linux server). The issue is I keep getting an "Access to the path is denied" when the File.move() is called. The media share is mapped to my network and I'm running as administrator. I have no issues when manually transferring the files, only when I use the File class.

The media share will not allow me to enable all permissions and is giving me a "Failed to enumerate objects in the container. Access is denied."

try 
{
    File.Move(file.FullName, MEDIA_SHARE_DIR);
}
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}  

EDIT: Needed to include the directory AND the filename

0 Answers0