vbs写的,直接读取读取“list.xls”文件
on error resume next
set ws=createobject("wscript.shell")
set fso=createobject("scripting.filesystemobject")
path=ws.currentdirectory
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open(path & "\list.xls")
h=1
do until objExcel.Cells(h,1).Value=""
fso.getfile(objExcel.Cells(h,1).Value).name=objExcel.Cells(h,2).Value
if err then
objexcel.quit
err.clear
msgbox "出现错误,脚本退出!",16+4096,"提示"
wscript.quit
end if
h=h+1
loop
objExcel.Quit
msgbox "操作成功!",4096+48,"系统提示"
