How to compress the PDF files in a folder and and sub-folders recursively?

Hello,

I have the following directory,

C:\Electronic Invoice\B01\20170101\10.PDF
C:\Electronic Invoice\B01\20170102\11.PDF
C:\Electronic Invoice\B01\20170103\12.PDF
C:\Electronic Invoice\B01\20170103\13.PDF
C:\Electronic Invoice\B01\20170204\15.PDF
C:\Electronic Invoice\B01\20170209\16.PDF
C:\Electronic Invoice\B01\20170211\17.PDF
C:\Electronic Invoice\B02\20170103\01.PDF

Can I compress everything in a single command line?

Customer
----------------------------------------------------

You can download VeryDOC PDF Compressor Command Line from this web page,

https://www.verydoc.com/pdfcompressor.html

This can be done easily by VeryDOC PDF Compressor Command Line software, you can run following command line to compress all PDF files in "C:\Electronic Invoice" folder and sub-folders (recursion),

for /r "C:\Electronic Invoice" %F in (*.pdf) do pdfcompressor.exe -ci jpg -cidown -cidownres 50 -gi jpg -gidown -gidownres 50 -mi fax -midown -midownres 50 "%F" "%~dpnF-out.pdf"

VeryPDF
----------------------------------------------------
Thank you very much, two more things
How do I make the output file have the same name as the input file
How does this work for network drives?

Customer
----------------------------------------------------
>>How do I make the output file have the same name as the input file

Thanks for your message, if you want to keep the same filenames for input and output files, you can run following command line,

for /r "C:\Electronic Invoice" %F in (*.pdf) do pdfcompressor.exe -ci jpg -cidown -cidownres 50 -gi jpg -gidown -gidownres 50 -mi fax -midown -midownres 50 "%F" "%~dpnF.pdf"

>>How does this work for network drives?

Yes, it does support network mapped drives, you can map the network path to local drive first, then you can compress the PDF files on this network path properly.

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!