I have a lookup file containing filenames. I also have a directory containing files, some of which have the names that correspond to some of the names in the directory.
How can I:
- Move exact matching files to a new directory or
- Remove non-matching files from the existing directory
Also, how can I do this recursively through a top-level directory and its subdirectories?