I have multiple files (all with the same extention) in different subfolders and I want to copy only a subset of them. For example, consider:
A/: 1.txt, 2.txt, 3.txt
B/: 4.txt, 5.txt, 6.txt
C/: 7.txt, 8.txt, 9.txt
I want to copy files 1.txt
, 2.txt
, 5.txt
, and 8.txt
to a new folder.
Is there a way to automate this operation knowing that I have more than 500 subfolders each containing a few thousand files and a list (txt file) of the files I want to copy?