Dim fso, folder, files
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder("R:\e") ' 取代为目标目录的路径
Set files = folder.Files
msgbox files.Count
If files.Count > 0 Then ' 检查目录下是否有档案
files(files.Count - 1).Delete ' 删除目录下最后一个档案
End If
Set files = Nothing
Set folder = Nothing
Set fso = Nothing
GPT写的,第8行出问题
WScript.Echo files.Item(0).Name
上面这行也"程序呼叫或引数不正确"
那位教教是那出错?
GPT&BING怎么问都说没错
thx