谢谢各位,我在线等大家的消息,呵呵...

解决方案 »

  1.   

    我在说的清除一点吧,我是这样写的代码:
    string path = "D:\\我的项目\\download";
    Directory.Delete(Path,true);
    我不想吧\\download目录删了怎么办?
      

  2.   

    string dir = "D:\\我的项目\\download"; if (Directory.Exists(dir)) 
        { 
            foreach(string d in Directory.GetFileSystemEntries(dir)) 
            { 
                if(File.Exists(d)) 
                    File.Delete(d); //直接删除其中的文件 
                else 
                    DeleteFolder(d); //递归删除子文件夹 
            } 
        }