我从迅雷下载的很多文件都是经过UrlEncode的,从火狐下载的文件存在这个问题,IE貌似没有,而我一般喜欢使用火狐,为了还原这些文件原本的名称编写了这个工具:


- 技术要点:
1、 WinForm进行URL编码
添加引用System.Web,调用HttpUtility.UrlEncode和HttpUtility.UrlDecode方法
2、遍历文件
//C#遍历指定文件夹中的所有文件 DirectoryInfo TheFolder=new DirectoryInfo(folderFullName); //遍历文件夹 foreach(DirectoryInfo NextFolder in TheFolder.GetDirectories()) this.listBox1.Items.Add(NextFolder.Name); //遍历文件 foreach(FileInfo NextFile in TheFolder.GetFiles()) this.listBox2.Items.Add(NextFile.Name);
3、修改文件名
File.Move(from, to)
- 功能说明:


- 运行环境
Windows + .Net4.0
- 获取程序