Directory.Move doesn't work (file already exist)

后端 未结 6 586
逝去的感伤
逝去的感伤 2020-11-30 06:42

I\'ve got main folder:

c:\\test

And there I have 2 folders: Movies and Photos.

Photos has three folders with files with the same s

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-30 07:08

    You can use move method directly.

    Directory.Move(@"c:\test\Movies\", @"c:\test\Test\");
    

    The folder will be deleted and copied it into Test Folder.

提交回复
热议问题