How does VBS get the Files collection
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!