Merge pdf... keep same name

Hi everyone
i’m using command line to use automator process to merge pdf

/System/Library/Automator/Combine\\ PDF\\ Pages.action/Contents/Resources/join.py --output merged.pdf myFile.pdf blank.pdf

But it save the final pdf on a third file name
How can i Overwrite one of the pdf ( keeping same file name )…

My WorkAround is to save same name+ increment ( yes its on batch processing )
THEN remove original
THEN rename final pdf ( removing increment number )

It must have more efficient way to replace pdf with final one
Thanks

You can use a temporary file

/System/Library/Automator/Combine\\ PDF\\ Pages.action/Contents/Resources/join.py --output /tmp/myFile.pdf myFile.pdf blank.pdf; mv /tmp/myFile.pdf myFile.pdf

Thanks Axel
Pretty much what i’v thought
I’m just wondering if a “save” on file is faster then “save as” a complete new file

I’v try to write the same file name on ( input ) and ( output ) but didn’t work… i thought it create the output file before read the input

At this time i’m processing 1 file every 3,4 seconde
I’m trying to speed up ( if it can be )

You can also do the merge right in Xojo via plugins.

On Mac by using PDFKit or CoreGraphics functions in the MBS Plugin.
Or cross platform using our DynaPDF plugin (Lite edition at least).

[quote=278447:Chris Paul]Hi,
If you having many questions in your mind regarding How to merge PDF?
Please Check this Software

Why would a Mac user buy such a program for $ 29?
The operating system has everything you need.

It’s a spam post.

Thanks for mentioning this Tim and Axel. Deleted.

People also buy my Combine PDFs app, too.

People search for a solution for a problem and are happy to pay a few $ for a nice app to do it.
They are not aware and often not interested to learn how to use the apps coming with the OS.

That explains why you have a couple of apps to delete your caches or to set hidden system preferences.