I am trying to use the following command to find all PDFs in the current directory (not recursively) - however I don't think it likes the '{}' on the --out.
find . -iname "*.pdf" -maxdepth 1 -exec sips -s format jpeg --resampleHeightWidth 129 100 '{}' --out '{}'.jpg \;
The find work when used with -print and sips works when I specify the name --out test.jpg. Any way to make this work? Or should I try xargs? I don't really want to use a loop for simplicity... Any ideas?
UPDATE: I attempted using xargs - but again get an error out_dir_not_found.
find . -iname "*.pdf" -maxdepth 1 -print0 | xargs -0 -I % sips -s format jpeg --resampleHeightWidth 129 100 % --out "%.jpg"
mymbpro:pdfs dh$ find . -iname "*.pdf" -maxdepth 1 -print0 | xargs -0 -I % sips -s format jpeg --resampleHeightWidth 129 100 % --out "%.jpg"
Error 10: out_dir_not_found /Users/darenhunter/Desktop/pdfs/ATTENTION.pdf.jpg
Try 'sips --help' for help using this tool
Error 10: out_dir_not_found /Users/darenhunter/Desktop/pdfs/DisNCLB119.pdf.jpg
Try 'sips --help' for help using this tool
Error 10: out_dir_not_found /Users/darenhunter/Desktop/pdfs/services2012.pdf.jpg
Try 'sips --help' for help using this tool
Error 10: out_dir_not_found /Users/darenhunter/Desktop/pdfs/Fall2011.pdf.jpg
Try 'sips --help' for help using this tool
ref