发布网友
共1个回答
热心网友
因为是do loop 内的是死循环, 如果需要拷贝完就退出循环,可以加Exit do ,代码修改如下
set fso=createobject("scripting.filesystemobject")
on error resume next
do
if fso.driveexists("D:\") Then
fso.copyfile "H:\*.doc","C:\新建文件夹"
exit do
end if
if fso.driveexists("G:\") then
fso.copyfile "G:\*.doc","C:\新建文件夹"
exit do
end if
if fso.driveexists("I:\") then
fso.copyfile "I:\*.doc","C:\新建文件夹"
exit do
end if
wscript.sleep 5000
loop追问没有do loop 循环啊? 你是那里复制过来的?