你能告诉我为什么我收到以下错误吗?
VBScript 运行时错误:此数组已修复或临时锁定:'temp'
这是生成错误的代码。我不确定如何解决它。
我只是想解压缩 DRY 文件夹中的文件并将其移动到 ACS 文件夹。非常感谢你
Set FSO = CreateObject("Scripting.FileSystemObject")
Set fldr = FSO.GetFolder("C:\Ebooks\DRY\")
For Each fil In fldr.Files
If LCase( Right( fil.Name, 4 ) ) = ".zip" Then
zipFilePath = fil.Path
temp = file.Name
temp = Left( temp, LEN(temp) - 4 ) ' remove the .zip
temp = Split( temp, "_" ) ' split base name away from month-day-year
temp = temp( UBOUND(temp) ) ' get just month-day-year
temp = Split( temp, "-" ) ' get month day and year separately
mn = CINT(temp(0)) ' get the month number
dirName = MonthName(mn,True) & temp(2) ' True means get 3 letter abbrev for month
Response.Write "Unpacking " & fil.Name & " to directory " & dirName & "<br/>" & vbNewLine
objZip.UnPack zipFilePath, "D:\ACS\" & dirName & "\"
End If
Next