次のエラーが発生する理由を教えてください。
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