| foldername=wscript.arguments.named.item("foldername") | | front=wscript.arguments.named.item("front") | | | | | | | | const filterflag=32 | | set shell=createobject("shell.application") | | set re=createobject("vbscript.regexp") | | re.pattern="$"&front | | re.ignorecase=true | | set nowfolder=shell.namespace(foldername) | | call filetree(nowfolder) | | sub filetree(fdobject) | | set items=fdobject.items() | | items.filter filterflag,"*" | | for each item in items | | if re.test(item.name) then wscript.echo item.path | | call filetree(item.getfolder) | | next | | end subCOPY |
顶呱呱好用
接受参数:selectfolder.vbs "/foldername:c:/program files" "/front:balabala"
当然你也可以自己改一下 |