在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
C# 重命名的方法是MoveTo() 官方文档地址 (https://msdn.microsoft.com/zh-cn/library/system.io.fileinfo.moveto%28VS.80%29.aspx) 另附上Demo部分代码: private void btn_start_Click(object sender, EventArgs e) { //找到目录 DirectoryInfo directoryinfo = new DirectoryInfo(txt_path.Text); int i = 1; //读取当前目录文件信息 foreach (var item in directoryinfo.GetFiles()) { string destPath = Path.Combine(txt_path.Text, i + item.Extension); if (item.Name.Length > 10) {
界面:
附Demo下载地址 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论