Copying first 1000 PDF files having single, double quotes in their name to another folder
- by racer_ace
I am having this folder with PDFs into it and I need to process 1000 at a time. So I need to move them into another folder, process them and delete them. For this I tried using
$ find . -maxdepth 1 -type f |head -1000|xargs cp -t $destdir
It gives error on single and double quotes in filename. There are thousands of files and I have no idea how many of them has these quotes in them.
Can anyone help me find a solution?
And I tried with the -0 option, it did not work