VB复制文件并命名

VB复制文件并命名,第1张

Private Sub Command1_Click()

Dim FileName As String, Path As String

Path = Trim(Text1.Text)

Path = Replace(Path, "\", "") '路径

FileName = Dir(App.Path &"\" &Path &"\*.bmp")

Do While FileName <>"" '枚举路径下的所有文件

FileCopy App.Path &"\" &Path &"\" &FileName, "f:\PHOTO\" &Path &FileName '复制文件

FileName = Dir()

Loop

End Sub

Private Sub Command1_Click()

Dim i As Integer

For i = 1 To 50

FileCopy "d:\a" &i &"\1.txt", "d:\a" &i &"\b\1.txt"

Kill "d:\a" &i &"\b\2.txt"

Next i

End Sub


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/tougao/12086097.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-20
下一篇 2023-05-20

发表评论

登录后才能评论

评论列表(0条)

保存