I have a list of filenames names.list
which contains names only. These files are scattered throughout my system in various sub folders but the structure is generally
uniquename/uniquename2/spades/filtered/filename
The constant is spades/filtered
I have used the following command when moving files from one directory
xargs -a file_list.txt cp -t /path/to/dest
And I spotted this thread on using wildcard/ partial file names
find . -path \*content/docs/file.xml
And I tried combining them like so
find . -path \*spades/filtered/ | xargs -a names.list cp -t $HOME/destination/
But I get the following error:
cp: cannot stat `filename': No such file or directory
tldr: I want to copy files using and input list of names only and partial file path