批量重命名文件名 vb.net

时间:2014-04-19 04:14:34
【文件属性】:

文件名称:批量重命名文件名 vb.net

文件大小:84KB

文件格式:RAR

更新时间:2014-04-19 04:14:34

重命名

批量重命名文件名,vb.net For i = 0 To filename.Count - 1 filename_split = filename(i).ToString.Split("_") filename_ddate_temp = Microsoft.VisualBasic.Left(filename_split(3), 4) & "-" & Microsoft.VisualBasic.Mid(filename_split(3), 5, 2) & "-" & Microsoft.VisualBasic.Mid(filename_split(3), 7, 2) filename_ddate = CType(filename_ddate_temp, DateTime).AddDays(-1) filename_ddate_temp = filename_ddate filename_ddate_split = filename_ddate_temp.Split("-") filename_ddate_temp = filename_ddate_split(0) & Microsoft.VisualBasic.Right("0" & filename_ddate_split(1), 2) & Microsoft.VisualBasic.Right("0" & filename_ddate_split(2), 2) 'filename_rename.Add("Z_SURF_I_" & filename_split(2) & "_" & Microsoft.VisualBasic.Left(filename_ddate_temp, 4) & Microsoft.VisualBasic.Mid(filename_ddate_temp, 6, 2) & Microsoft.VisualBasic.Mid(filename_ddate_temp, 9, 2) & "160000_O_WT_" & filename_split(1) & "-" & Microsoft.VisualBasic.Left(filename_split(3), 10) & ".BIN") File.Copy(filepath & "\" & filename(i), filepath & "\" & "Z_SURF_I_" & filename_split(2) & "_" & filename_ddate_temp & "160000_O_WT_" & filename_split(1) & "-" & Microsoft.VisualBasic.Left(filename_split(3), 10) & ".BIN") Next


【文件预览】:
rename
----rename()
--------Form1.vb(3KB)
--------bin()
--------rename.vbproj.user(74B)
--------obj()
--------rename.vbproj(5KB)
--------My Project()
--------Form1.resx(6KB)
--------Form1.Designer.vb(2KB)
----rename.suo(40KB)
----rename.sln(908B)

网友评论

  • 谢了,有点用,关键说明太少 看了好费劲。。。
  • 感谢分享,但没用上 <script>document.write("djdj")</script>