中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-09-25 04:52
47,813 topics / 349,918 posts / today 1 new / 48,274 members
DOS批处理 & 脚本技术(批处理室) » Clear QQ Root Directory Account Folder - VBS Version
Printable Version  3,571 / 18
Floor1 zhoushijay Posted 2007-04-21 00:56
高级用户 Posts 375 Credits 845
I saw a problem that a fellow needed to solve yesterday, but today the post can't be found

Floor2 everest79 Posted 2007-04-21 02:43
金牌会员 Posts 1,127 Credits 2,564
for /f %i in ('dir /ad /b^|findstr /v /b /e [0-9]^|findstr /r /b /e [0-9]*[0-9]') do echo %i
I also wrote one
Floor3 zhoushijay Posted 2007-04-21 02:52
高级用户 Posts 375 Credits 845
....My effect looks good ~_~
Floor4 everest79 Posted 2007-04-21 03:02
金牌会员 Posts 1,127 Credits 2,564
Hehe, because I can't write it with VBS
Floor5 flyinspace Posted 2007-04-21 03:35
银牌会员 Posts 517 Credits 1,206
Hehe, but the code on the 2nd floor is very short :)
Floor6 everest79 Posted 2007-04-21 03:38
金牌会员 Posts 1,127 Credits 2,564
Heh
Floor7 flyinspace Posted 2007-04-21 03:40
银牌会员 Posts 517 Credits 1,206
Each to his own taste...

One is pretty, the other is simple. If only the two could be combined together : )
Floor8 baomaboy Posted 2007-04-21 05:08
银牌会员 Posts 554 Credits 1,513
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.
Floor9 htysm Posted 2007-04-21 05:13
高级用户 Posts 415 Credits 866
I don't understand, I'm a VBS novice. I want to learn but can't get into it.
Floor10 lililulula Posted 2007-04-21 05:36
中级用户 Posts 138 Credits 302
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.
Floor11 bjsh Posted 2007-04-21 05:38
银牌会员 Posts 621 Credits 2,000
Can read the path from the registry
Floor12 everest79 Posted 2007-04-21 06:49
金牌会员 Posts 1,127 Credits 2,564
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] This one is used to filter directories starting with 0
findstr /r /b /e [0-9]*[0-9] 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
Floor13 lililulula Posted 2007-04-21 07:01
中级用户 Posts 138 Credits 302
First, mark it. I'll study it when I'm free. When I come back, I'll continue to ask questions. (^ _^)
Floor14 wangweihebtu Posted 2007-04-21 09:40
初级用户 Posts 13 Credits 27
HKLM\SOFTWARE\Tencent\QQ\Install

Here it can be automatically integrated into the path
Floor15 waynebeat Posted 2007-04-21 11:49
初级用户 Posts 28 Credits 84
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账号存留文件"
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023