Forum Discussion
Legion97
Sep 06, 2022Copper Contributor
Can you make a script to cross check names in excel column with filenames in the explorer folder?
Hi, as written in subject, is it possible to make a script/macro (preferably with python) that cross checks X amount(in my current case in the hundreds+) of names in an excel sheet with existing file...
Riny_van_Eekelen
Sep 06, 2022Platinum Contributor
Legion97 Not much of a programmer myself, but with PowerQuery (PQ) you can achieve this pretty easily.
Step one is to connect to the main folder (that may include sub-folders). Normally you would want to combine relevant files from a folder with PQ, but in your case, you just want to connect to folder and "read out" all the file names in there,
Then, create a table from the list of file names you want to check their existence for and connect to that table with PQ.
Finally, you perform a merge of the table with file names against the (connection only) full list of files in the main folder and sub-folders.
Peace of cake, though, perhaps hard to believe and difficult to imagine if you have never worked with PQ before.
- Legion97Sep 06, 2022Copper ContributorThx for the reply, Ok i'll give that a try. 🙂