1,451
社区成员
发帖
与我相关
我的任务
分享
Private Sub Dir1_Change()
FilePath = File1.Path & "\"
FileName = Dir(FilePath & "*.txt")
While Len(FileName) <> 0
Arr = Split(FileName, "-")
If Mid(FileName, 1, 1) = "Z" And Mid(FileName, 3, 1) = "P" Then
Name FilePath & FileName As FilePath & Mid(FileName, 1, 1) & "0" & Mid(FileName, 2, 1) & Mid(FileName, 3)
If Mid(Arr(UBound(Arr)), 3, 1) = "." Then
Name FilePath & FileName As FilePath & "1-printhighf-" & Mid(Arr(UBound(Arr)), 1, 1) & "0" & Mid(Arr(UBound(Arr)), 2)
End If
FileName = Dir
Wend
File1.Path = Dir1.Path
End Sub