Is it possible to add also a wildcard in the folder path? There are 4 levels of folders.
Main_folder: path is known
Subfolders 1: foldername is partially known. In my example 4. There is a folder 4.1 and 4.2(also 5.1, 5.2, 6.1 and 6.2) but I don`t know where the files will end up
subfolders 2: path is known
subfolders 4: here are the folders located that I need to copy.
FSO.copyfolder "C:\Users\USER\Desktop\retrieve test\New folder\4*\*" & wb.Sheets("Sheet3").Range("B1") & "*", "C:\Users\USER\Desktop\retrieve test\Lay\Lay"
Below example works to copy the correct folders but here is my third folder defined (this should be variable)
FSO.copyfolder "C:\Users\USER\Desktop\retrieve test\New folder\4.1\*" & wb.Sheets("Sheet3").Range("B1") & "*", "C:\Users\USER\Desktop\retrieve test\Lay\Lay"
What the macro needs to do is loop through all the folders to find the partial name that is defined in B1 on sheet 3.

