C#判断文件夹是否存在,不存在则创建:string folderPath="D:\\data"//判断文件夹是否存在if(!Directory.Exists(folderPath)){ //创建文件夹 Directory.CreateDirectory(folderPath);}