System.IO.DirectoryNotFoundException after deleting an empty folder and recreating it

后端 未结 7 2214
我在风中等你
我在风中等你 2021-02-13 04:37

I want to copy a folder, and i want to delete destination folder first. So I am deleting destination folder then recreate it and then copy files. The problem is that i get the <

7条回答
  •  盖世英雄少女心
    2021-02-13 05:15

    Try using the FileIO method instead, I had the same issue, code below works perfect.

    FileIO.FileSystem.DeleteDirectory(directoryName,FileIO.DeleteDirectoryOption.DeleteAllContent)

提交回复
热议问题