Get the App
SLTechnology News&Howtos  ›  Development  › 

How does VBS get the Files collection

Shulou Source: shulou.com Published: 2022-06-03 19:39:02 11月12日 Update

This article introduces the relevant knowledge of "how VBS obtains Files collection". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

A collection of all File objects in a folder.

description

The following code illustrates how to get a Files collection and use For Each... Next statement enumerates collection members:

Function ShowFolderList(folderspec) Dim fso, f, f1, fc, s Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(folderspec) Set fc = f.Files For Each f1 in fc s = s & f1.name s = s & "

" Next ShowFolderList = sEnd Function"VBS how to get Files collection" content introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

Tags: Content more knowledge practicality learning and then code dilemma reality objects situations members files folders articles cases editing websites industries statements Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Redmi Shulou Tech Info vpn MySQL