📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form form1
Caption = "批量重命名文件"
ClientHeight = 2625
ClientLeft = 60
ClientTop = 345
ClientWidth = 5235
LinkTopic = "Form1"
ScaleHeight = 2625
ScaleWidth = 5235
StartUpPosition = 1 '所有者中心
Begin VB.TextBox Text3
Height = 345
Left = 2415
TabIndex = 9
Text = "bmp"
Top = 765
Width = 2760
End
Begin VB.DriveListBox Drive1
Height = 300
Left = 75
TabIndex = 8
Top = 75
Width = 1410
End
Begin VB.TextBox Text2
Height = 345
Left = 2415
TabIndex = 7
Top = 345
Width = 2760
End
Begin VB.TextBox Text1
Height = 345
Left = 2415
TabIndex = 4
Text = "image"
Top = 1185
Width = 2760
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 3420
TabIndex = 3
Top = 2145
Width = 1560
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 1785
TabIndex = 2
Top = 2145
Width = 1560
End
Begin VB.DirListBox Dir1
Height = 930
Left = 75
TabIndex = 1
Top = 420
Width = 1410
End
Begin VB.FileListBox File1
Height = 1170
Left = 75
TabIndex = 0
Top = 1380
Width = 1410
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "选中目录 扩展名"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 1560
TabIndex = 6
Top = 405
Width = 2250
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "新文件名 "
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 1560
TabIndex = 5
Top = 1275
Width = 975
End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load() '选择默认路径
Dir1.Path = App.Path & "\ml"
File1.Path = Dir1.Path
File1.Pattern = "*.bmp"
Text2.Text = File1.Path
End Sub
Private Sub Drive1_Change() '选择驱动器
Dir1.Path = Drive1.Drive
End Sub
Private Sub Dir1_Change() '选择文件夹
File1.Path = Dir1.Path
Text2.Text = File1.Path
End Sub
Private Sub File1_Click()
Text2.Text = File1.Path & "\" & File1.FileName
End Sub
Private Sub Command1_Click() '批量重命名文件
Dim tt As String
Dim dd As String
For i = o To File1.ListCount - 1
File1.ListIndex = i
dd = File1.Path & "\" & File1.FileName
tt = File1.Path & "\" & Text1.Text & i & "." & Text3.Text
Name dd As tt '重命名文件
Next i
File1.Refresh
End Sub
Private Sub Command2_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -