I want to be able to search /Volumes/NAS for 2000 files which I have a list of in ~/Desktop/list.txt
The files are buried in a maze of sub-directories and while I could use Spotlight to find each one, I really want to streamline the process. In theory the files are all there and only there once.
I am somewhat familiar with the terminal and tried to perform my search using the xargs and find commands. When I run the following command, I get the following error:
$ sort ~/Desktop/list.txt | xargs find /Volumes/NAS -name -and -not -path *ABCXYZ\ Key\ Exhibits*
find: filename.pdf: unknown primary or operator
I want to exclude files in the /Volumes/NAS/ABCXYZ Key Exhibits folder, which is the reason for the -and -not -path portion.
Had this worked I wanted to pipe the output into xargs and cp commands to copy the PDF files into another folder.
Any ideas what went wrong with my xargs find operation?
If this is a stupid way of doing it, I am open to other suggestions. It seems like Automator could do this, but I was unable to use my list.txt file and if I have to make 2000 separate Automation files, then I might as well use Spotlight.
Thanks for your help.
The files are buried in a maze of sub-directories and while I could use Spotlight to find each one, I really want to streamline the process. In theory the files are all there and only there once.
I am somewhat familiar with the terminal and tried to perform my search using the xargs and find commands. When I run the following command, I get the following error:
$ sort ~/Desktop/list.txt | xargs find /Volumes/NAS -name -and -not -path *ABCXYZ\ Key\ Exhibits*
find: filename.pdf: unknown primary or operator
I want to exclude files in the /Volumes/NAS/ABCXYZ Key Exhibits folder, which is the reason for the -and -not -path portion.
Had this worked I wanted to pipe the output into xargs and cp commands to copy the PDF files into another folder.
Any ideas what went wrong with my xargs find operation?
If this is a stupid way of doing it, I am open to other suggestions. It seems like Automator could do this, but I was unable to use my list.txt file and if I have to make 2000 separate Automation files, then I might as well use Spotlight.
Thanks for your help.