|
zhoushijay
高级用户
    Autowalk
积分 845
发帖 375
注册 2007-3-3
状态 离线
|
『楼 主』:
清除QQ根目录下账号文件夹-VBS版
使用 LLM 解释/回答一下
昨天看到有位仁兄需要解决的问题,今天帖子找不到了
'请自己修改程序中QQ文件夹的位置。
'不管是8位还是9位,只要是数字名字的文件夹都会删除!
'顺便说一句,最近的中国电视剧拍的越来越没品位了!
dim fso,finm,all
set fso=createobject("scripting.filesystemobject")
set flnm=fso.getfolder("C:\Program Files\QQ2006")
set all=flnm.subfolders
for each path in all
dim fs,fnm
set fs=createobject("scripting.filesystemobject")
fnm=fs.getfilename(path)
on error resume next
fnm=int(fnm)
if err.number<>13 then
dim list
fs.deletefolder(path)
list=list&fnm&chr(10)
end if
next
msgbox "已删除的QQ号码文件夹:"&chr(10)&list,vbinformation,"清除QQ账号存留文件"
I saw a problem that a fellow needed to solve yesterday, but today the post can't be found
'Please modify the location of the QQ folder in the program by yourself.
'No matter whether it is 8-digit or 9-digit, any folder with a numeric name will be deleted!
'By the way, recently Chinese TV dramas are getting more and more tasteless!
dim fso,finm,all
set fso=createobject("scripting.filesystemobject")
set flnm=fso.getfolder("C:\Program Files\QQ2006")
set all=flnm.subfolders
for each path in all
dim fs,fnm
set fs=createobject("scripting.filesystemobject")
fnm=fs.getfilename(path)
on error resume next
fnm=int(fnm)
if err.number<>13 then
dim list
fs.deletefolder(path)
list=list&fnm&chr(10)
end if
next
msgbox "Deleted QQ number folders:"&chr(10)&list,vbinformation,"Clear QQ account remaining files"
|
|
2007-4-21 00:56 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
for /f %i in ('dir /ad /b^|findstr /v /b /e [0-9]^|findstr /r /b /e [0-9]*[0-9]') do echo %i
我也写了一个
for /f %i in ('dir /ad /b^|findstr /v /b /e ^|findstr /r /b /e *') do echo %i
I also wrote one
|
|
2007-4-21 02:43 |
|
|
zhoushijay
高级用户
    Autowalk
积分 845
发帖 375
注册 2007-3-3
状态 离线
|
|
2007-4-21 02:52 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
嘿嘿,因为我用VBS写不出来
Hehe, because I can't write it with VBS
|
|
2007-4-21 03:02 |
|
|
flyinspace
银牌会员
    
积分 1206
发帖 517
注册 2007-3-25
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
呵呵,但2楼的代码非常短:)
Hehe, but the code on the 2nd floor is very short :)
|

知,不觉多。不知,乃求知 |
|
2007-4-21 03:35 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
|
2007-4-21 03:38 |
|
|
flyinspace
银牌会员
    
积分 1206
发帖 517
注册 2007-3-25
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
萝卜白菜各有所爱。。。
一个漂亮,一个简洁。若是两个可以结合一起就好了:)
Each to his own taste...
One is pretty, the other is simple. If only the two could be combined together : )
|

知,不觉多。不知,乃求知 |
|
2007-4-21 03:40 |
|
|
baomaboy
银牌会员
    
积分 1513
发帖 554
注册 2005-12-30
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
懒啊,所以小建议,最好是能自动搜索路径,不然有输入路径的时间,手动都删除完了。
Lazy, so a small suggestion, it's best to be able to automatically search paths. Otherwise, by the time you enter the path, you could have manually deleted it all.
|

好多菩提树,好多明镜台。本来好多物,好多的尘埃。 |
|
2007-4-21 05:08 |
|
|
htysm
高级用户
   
积分 866
发帖 415
注册 2005-12-4
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
不懂,偶是VBS盲。想学可学不下去。
I don't understand, I'm a VBS novice. I want to learn but can't get into it.
|

欢迎你到批处理爱好者联盟QQ群:18023953 |
|
2007-4-21 05:13 |
|
|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
everest79兄的代码很牛,经测试可以达到效果,希望能够有详细解释,昨天我也曾经尝试写这个批,由于水平太菜,后来没写下去.望everest79兄给出注释,先谢了
Brother everest79's code is very impressive. After testing, it can achieve the effect. I hope to have a detailed explanation. I also tried to write this batch script yesterday, but because I was too inexperienced, I didn't continue writing it later. Please give comments, thank you in advance.
|
|
2007-4-21 05:36 |
|
|
bjsh
银牌会员
    
积分 2000
发帖 621
注册 2007-1-1
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
可以从注册表中读取路径
Can read the path from the registry
|
|
2007-4-21 05:38 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
for /f %i in ('dir /ad /b^|findstr /v /b /e [0-9]^|findstr /r /b /e [0-9]*[0-9]') do echo %i
findstr /v /b /e [0-9] 这一个是用来过滤目录0的
findstr /r /b /e [0-9]*[0-9] 这个将上一步筛选过的目录名称再次过滤,这次结果就是所有QQ号目录
嘿嘿,其实这个不安全,要是没有,可能会把整个目录删掉
for /f %i in ('dir /ad /b^|findstr /v /b /e ^|findstr /r /b /e *') do echo %i
findstr /v /b /e This one is used to filter directories starting with 0
findstr /r /b /e * This filters the directory names filtered in the previous step again, and the result this time is all QQ number directories
Hehe, actually this is not safe. If there is none, it may delete the entire directory
|
|
2007-4-21 06:49 |
|
|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
先标记下 有空研究下 回来我还会继续提问的 (^ _^)
First, mark it. I'll study it when I'm free. When I come back, I'll continue to ask questions. (^ _^)
|
|
2007-4-21 07:01 |
|
|
wangweihebtu
初级用户
 
积分 27
发帖 13
注册 2006-12-11
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
HKLM\SOFTWARE\Tencent\QQ\Install
这里可以自动整到路径
HKLM\SOFTWARE\Tencent\QQ\Install
Here it can be automatically integrated into the path
|
|
2007-4-21 09:40 |
|
|
waynebeat
初级用户
 
积分 84
发帖 28
注册 2006-5-3
状态 离线
|
   『第 15 楼』:
使用 LLM 解释/回答一下
把楼主和14楼的贴粘一起,混点分,呵呵
DIm regQQpath,objShell,QQpath
Dim fso,finm,all
regQQpath = "HKLM\Software\Tencent\QQ\Install"
Set objShell = CreateObject("WScript.Shell")
QQpath = objShell.regRead(regQQpath)
set fso=createobject("scripting.filesystemobject")
set flnm=fso.getfolder(QQpath)
set all=flnm.subfolders
for each path in all
dim fs,fnm
set fs=createobject("scripting.filesystemobject")
fnm=fs.getfilename(path)
on error resume next
fnm=int(fnm)
if err.number<>13 then
dim list
fs.deletefolder(path)
list=list&fnm&chr(10)
end if
next
msgbox "已删除的QQ号码文件夹:"&chr(10)&list,vbinformation,"清除QQ账号存留文件"
Mix the building owner's post and the 14th floor's post together to earn some points, heh
DIm regQQpath,objShell,QQpath
Dim fso,finm,all
regQQpath = "HKLM\Software\Tencent\QQ\Install"
Set objShell = CreateObject("WScript.Shell")
QQpath = objShell.regRead(regQQpath)
set fso=createobject("scripting.filesystemobject")
set flnm=fso.getfolder(QQpath)
set all=flnm.subfolders
for each path in all
dim fs,fnm
set fs=createobject("scripting.filesystemobject")
fnm=fs.getfilename(path)
on error resume next
fnm=int(fnm)
if err.number<>13 then
dim list
fs.deletefolder(path)
list=list&fnm&chr(10)
end if
next
msgbox "已删除的QQ号码文件夹:"&chr(10)&list,vbinformation,"清除QQ账号存留文件"
|
|
2007-4-21 11:49 |
|