Merge pdfs in subfolder

Hi there, I know the "How to get Hazel to go into subfolders" post, but that did not help to solve my problem.
My main folder is called "X", pdfs in that folder will be sorted in a subfolder named like a part of the filename.
The pdf files in that subfolder should merge to one pdf-file using "RUN SHELL SCRIPT"
Well, the "combined.pdf" is somehow stored in the main folder "X", not in the subfolder
And the combined.pdf is empty by the way. Any idea how I get this thing running correctly?
"Run on folder contents" is my top rule.
Thanks for your help!
My main folder is called "X", pdfs in that folder will be sorted in a subfolder named like a part of the filename.
The pdf files in that subfolder should merge to one pdf-file using "RUN SHELL SCRIPT"
- Code: Select all
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combined.pdf -dBATCH *.pdf
Well, the "combined.pdf" is somehow stored in the main folder "X", not in the subfolder

"Run on folder contents" is my top rule.
Thanks for your help!