locked
how can I copy file from one folder to another folder RRS feed

  • Question

  • User-1355965324 posted

    I  am trying to copy the file from one folder to another folder. I am trying to copy from c:\empdoc\emp.doc file into the folder @"\\10.0.0.300\doc\emp.pdfBut When I press upload button it shows the path of source file as @\C:\fakepath\emp.pdf

    How can I copy from "C:\doc\\emp.pdf"   into the folder  @"\\10.0.0.300\doc\empdoc. Please help with suggested code 

    public class EmpDocumentModel
        {
             
            public string FileUrl { get; set; }
    }
    [HttpPost]         
    public IActionResult Upload(EmpDocumentModel empdocModel)
            {
                 // to file  copy  empdocModel.FileNameURL file  into the folder @"\\10.0.0.300\doc\empdoc
                return View();
            }

    <div>   </div>

    Wednesday, February 5, 2020 7:36 AM

All replies