I have nearly 10k excel files in a folder and I have a python list of filenames of nearly 8k. I want to extract the files from that folder that are present in the list, and then keep that files in another folder. I have looked at these answers but none explains my issue:
- Get a filtered list of files in a directory
- Python: List all the file names in a directory and its subdirectories and then print the results in a txt file
- Use a list of values to select rows from a pandas dataframe
Any suggestions on how I can do that?