[Solved] List All .Doc Files That Have Associated PDFs

General discussion related to "Everything".
Post Reply
skeezix
Posts: 21
Joined: Sat Jun 23, 2018 8:06 pm

[Solved] List All .Doc Files That Have Associated PDFs

Post by skeezix »

I would like to search for all .doc files and all .pdf files whose filenames are the same. How ca

I have about 1,500 .doc files on my computer. I have printed many of them to PDF. I would like to print pdf files for all the .doc files that do not yet have pdf files.

To do this, I would like to list all .doc files and their pdf files regardless of whether they have pdf files or not. The file list should look like this:
<filename 1>.doc
<filename 1>.pdf
<filename 2>.doc (no pdf file)
<filename 3>.doc (no pdf file)
<filename 4>.doc
<filename 5>.pdf
...and so on.
How would I do that?
Last edited by skeezix on Wed Dec 11, 2024 1:10 am, edited 1 time in total.
skeezix
Posts: 21
Joined: Sat Jun 23, 2018 8:06 pm

Re: List All .Doc Files That Have Associated PDFs

Post by skeezix »

UPDATE:

I found the answer in the FAQ:

Search Term: d: .doc |.pdf

Gives me exactly what I need. :)
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: List All .Doc Files That Have Associated PDFs

Post by void »

<*.doc fileexists:$stem:.pdf> | <*.pdf fileexists:$stem:.doc>


file-exists:
tuska
Posts: 1098
Joined: Thu Jul 13, 2017 9:14 am

Re: List All .Doc Files That Have Associated PDFs

Post by tuska »

exact:<*.doc fileexists:$stem:.pdf> | <*.pdf fileexists:$stem:.doc>


exact: refers to the file extension .doc
This is to avoid that files with the file extension .docx are also taken into account.
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: List All .Doc Files That Have Associated PDFs

Post by NotNull »

And with a little cheating (which comes in handy if more than two extensions need to be compared):

Code: Select all

ext:doc;pdf   exact:fileexists:$stem:.doc  exact:fileexists:$stem:.pdf
I even wrote a pairs: filter for this (syntax: pairs:.doc;.txt;.gif;... ), but that was deleted (I delete most of the stuff I do).
Probably wouldn't work with the new preprocessor syntax anyway.

Will rewrite it when time permits as it looks to be somewhat useful after all ..
Post Reply