删除文件夹、创建文件夹、删除文件 等操作
2012-09-03 16:31
281 查看
using System.IO;
System.IO.DirectoryInfo dirinfo = System.IO.Directory.CreateDirectory(Server.MapPath("/go/1111")); //创建文件夹
Directory.Delete(Server.MapPath("/go/1111"), true); //删除1111文件夹
System.IO.File.Delete(Server.MapPath("/Image/Case/1111.jpg")); //删除1111.jpg文件
System.IO.DirectoryInfo dirinfo = System.IO.Directory.CreateDirectory(Server.MapPath("/go/1111")); //创建文件夹
Directory.Delete(Server.MapPath("/go/1111"), true); //删除1111文件夹
System.IO.File.Delete(Server.MapPath("/Image/Case/1111.jpg")); //删除1111.jpg文件
相关文章推荐
- C# 文件操作 全收录 追加、拷贝、删除、移动文件、创建目录、递归删除文件夹及文件....
- PHP文件及文件夹操作(创建,删除,移动,复制)
- php文件及文件夹操作(创建、删除、移动、复制)
- php : 文件及文件夹操作(创建、删除、移动、复制)
- C# 文件操作(全部) 追加、拷贝、删除、移动文件、创建目录 修改文件名、文件夹名
- C# 文件操作 全收录 追加、拷贝、删除、移动文件、创建目录、递归删除文件夹及文件
- 转:C# 文件操作 全收录 追加、拷贝、删除、移动文件、创建目录、递归删除文件夹及文件
- java13.语言进阶------本地文件操作---文件夹的创建、重命名、删除
- C#文件夹及文件操作(检查 创建 读取 写入 修改 删除)
- Java中文件和文件夹创建、删除和移动操作,Java Socket多线程传输多文件
- java_对文件的删除、剪切、移动和创建文件夹操作
- php文件及文件夹操作(创建、删除、移动、复制)
- Linux系统下的文件和文件夹相关操作(创建/删除/修改权限)
- [C++]文件/文件夹的创建和删除操作
- php文件及文件夹操作(创建、删除、移动、复制)
- PHP操作文件类(文件和文件夹创建,复制,移动和删除)
- PHP文件及文件夹操作之创建、删除、移动、复制
- C# 文件操作(全部) 追加、拷贝、删除、移动文件、创建目录 修改文件名、文件夹名
- linux学习入门3——linux文件基本操作(linuxcast.net)(复制、移动、重命名、创建、删除文件及文件夹)
- C# 文件操作(全部) 追加、拷贝、删除、移动文件、创建目录 修改文件名、文件夹名