这是我的代码:
Sub TestRun()
' Define variables
Dim file As String, folder As String
' Define working directory
folder = "E:\MainFolder\Appointments\"
' Define type of file to search for
file = Dir(folder & "*.zip")
ZipPath = "E:\MainFolder\Appointments\" & file
Call UnZip(folder, ZipPath)
End Sub
我想在提取后使用不同的文件名。我希望它是appointmentments.csv而不是文件
答案 0 :(得分:1)
您可以在解压缩后使用Name
函数重命名文件
Name folder & oldFilename As folder & newFilename