Home > Web Front-end > JS Tutorial > VBS code to get the names of all folders in the current directory

VBS code to get the names of all folders in the current directory

高洛峰
Release: 2017-01-16 10:11:05
Original
1746 people have browsed it

VBS gets the names of all folders in the current directory, excluding subfolders. I want to operate each folder, so it is best to use loop output.

When testing, make sure there is a folder in the current directory, otherwise the output will be empty.

Set ws=WScript.CreateObject("wscript.shell")
w=ws.CurrentDirectory
Set fso=WScript.CreateObject("scripting.filesystemobject")
Set fs=fso.GetFolder(w)
Set f=fs.SubFolders
For Each uu In f
t=t & uu.Path & vbcrlf
Next
MsgBox t
Copy after login

For more VBS code related articles to obtain the names of all folders in the current directory, please pay attention to the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template