1

I have one folder that has below location "E:\New folder\ftp\data\666\pdffiles" and destionation path "C:\Users\arun\Documents\Visual Studio 2012\Projects\ShopFloorApp\data\666\pdffiles". So i need to move all files from source to destination folder. in which case final directory form source(\data\666\pdffiles) need to same as destination(\data\666\pdffiles).

And i am tried with following one

string sourceDirectory = "E:\New folder\ftp\data\666\pdffiles"
 string destinationDirectory = "C:\Users\arun\Documents\Visual Studio 2012\Projects\ShopFloorApp\data\666\pdffiles"
            Directory.Move(environmentVariable,localdirectory);

It shows error as "Source and destination path must have identical roots. Move will not work across volumes."

So kindly give your suggestion.

Clemens
  • 123,504
  • 12
  • 155
  • 268
Arun D
  • 279
  • 3
  • 18
  • May be here you find. `http://stackoverflow.com/questions/26557614/directoryinfo-moveto-source-and-destination-path-must-have-identical-roots-m` – Af'faq Apr 11 '17 at 05:48

0 Answers0