Replacing files in a folder structure with files from an unsorted folder

Posted by Andrew on Super User See other posts from Super User or by Andrew
Published on 2012-11-02T14:09:20Z Indexed on 2012/11/04 23:04 UTC
Read the original article Hit count: 153

Filed under:

I have over 50,000 PDFs organized into folders in a file called PDFACT.

I needed to compress these files so I ran them through Adobe to batch compress them and this worked—except Adobe could only output the files without their folder structure.

So basically I have 50,000 PDFs set up in a folder with hundreds of subfolders, and everything was organized. I ended up with one folder with 50,000 compressed PDFs in it, just in alphabetical order. Somehow I need to replace all the orginal PDFs with their compressed copies.

Let me give an example: In the folder PDFACT we have the following file:


… and in the output folder that Adobe created we have just:


This copy is smaller then the one in PDFACT and has the same name but it is just lumped in with every other PDF. The folder structure and subfolders are gone.

Is there any way to replace all the larger uncompressed PDFS inside the orginal folder structure with their now compressed counterparts?

© Super User or respective owner

Related posts about Windows

Related posts about file