Hi all,
Inside the path C:\Users\user\Documents\Test Searcher I have a lot of folders that have the material and the customer name as a part of the folder string name:
3154- Shoes Puma
3155- Shirt Puma
3156- Shoes Adidas
3157- Belt Nike
etc...
Inside these folders then there are still more subfolders with a lot of files. Also note that there are More than 3000 folders....
My goal was to achieve a Macro to list all the files that the name of the file contains the specific text I would put in A2 through all the subfolders from the main folders that contains part of the text I would put in A1.
Ex: From all the folders inside the path C:\Users\user\Documents\Test Searcher that for example contains the words "Shoes" to then search inside all the subfolders of that specific folders all the files containing the file name text "template"
So, in A2 would appear part of the file name "Template" and in A1 part of the folder name "Shoes".
Because I'm quite a begginer, the closest code I could achieve is the one created by Akatrouble based on this thread https://www.excelforum.com/excel-pro...ple-paths.html I edited the code to achieve the following:
Based on the folder (and all the subfolders) from the path I put in A1 to look for all the files that contains in the file name the text I put in A2 and make a list to be pasted in the sheet named "Test Searcher"
Although it is not exactly what I want, I still could work with it. The code works good, but I'm the dealing with a small issue that I certainly don't know how to solve. For some reason the part from this code is case sensitive:
meaning if I put in range A2 the text "plate" it will list all the files that have the name "Template" for example. But if in A2 I put "PLATE" or "TEMPLATE" it will not list any file if the file name is written as "Template". I've tried to use Lcase function, but because I have some different text possibilites it fails to work in some cases. So my will would be to list all the files without taking into account any capitalization, therefore as a total case insensitive.
Is there any way to achieve that? Or I should create a completly new code?
Thanks in advance for your kind attention!
Bookmarks