0

I want to move folder which is located under program file folder with c# code.

Source path: 'C:\Program Files\MyApp\Testing'
Target path: 'C:\'
I wish to have: 'C:\Testing'

Thanks.

Dr.jacky
  • 3,341
  • 6
  • 53
  • 91
Alex.Minn
  • 9
  • 2
  • I dont think there is any one liner .NET function to copy a directory,this is because of security.You need to write your own function to do that. – Rohit Feb 15 '16 at 06:01
  • Possible duplicate of [Folder copy in C#](http://stackoverflow.com/questions/1974019/folder-copy-in-c-sharp) – Rohit Feb 15 '16 at 06:02
  • [Directory.Move](https://msdn.microsoft.com/en-us/library/system.io.directory.move(v=vs.110).aspx) . but it is not going to be an easy task, your application will need high privileges. – bansi Feb 15 '16 at 06:03
  • 2
    @kyle you can use Directory.Move that is a oneliner – bansi Feb 15 '16 at 06:07

0 Answers0