I\'m working with the .NET Compact Framework 3.5 and want to delete some specific folders and their subfolders. When I run the app it gives IO exception. I\'ve tried to use Dire
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"
Try this..
var dir = new DirectoryInfo(@FolderPath);
dir.Delete(true);
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.