C# Deleting Directories

泄露秘密 提交于 2019-12-02 11:38:42
acarlon

Why not delete the directory recursively:

Directory.Delete(path, true);

See here.

Also, see here as it may be similar to what you are encountering.

Try this..

var dir = new DirectoryInfo(@FolderPath);
dir.Delete(true);
artokai

You are not telling what kind of IO exception you are getting, Are you missing a backslash () in your path?

mainPath + "CRM" becomes "\Storage Card\denemeCRM" and not "\Storage Card\deneme\CRM"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!