LinguaFranca
Technical User
I need to tweak the code of the following piece of code so that not all files of all subfolders are picked up but only files of a specific file type I previously define. In my case I would like to search for *.frm, *.res and *.properties files. I tried several routes but wasn't successful in how to tell the script to look for files ending in *.frm. Found this code ín this forum and it works fine so far so I would like to take this as a basis for fine-tuning it.
Code:
Sub Main
Call LoopFoldersListFiles("C:\CVS\en\ESI\11.1\UI\assets")
End Sub
Sub LoopFoldersListFiles(path As String)
' Need references to Microsoft Scripting Runtime
Dim fso As New FileSystemObject
Dim f As Folder, sf As Folder, fi As File
Set f = fso.GetFolder(path)
For Each sf In f.SubFolders
LoopFoldersListFiles (sf.Path)
Next
For Each fi In f.Files
PSL.Output fi.Path
Next
End Sub