SEARCH FOR FOLDERS WITHOUT PDF FILES

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
D.BRACKEN2013
Posts: 1
Joined: 11 Nov 2019 08:08

SEARCH FOR FOLDERS WITHOUT PDF FILES

#1 Post by D.BRACKEN2013 » 11 Nov 2019 08:14

I currently have a task of determining what drawings have pdf's created from the drawing software...
BUT there are over 5000 drawing folders...

Question in hand.
Is there any cmd commands that I can use to highlight which folders in a directory do not have PDF files in them?

Hopefully you do as if not. My life is going to get very boring... very quickly...

Thanks in advance.

aGerman
Expert
Posts: 3775
Joined: 22 Jan 2010 18:01
Location: Germany

Re: SEARCH FOR FOLDERS WITHOUT PDF FILES

#2 Post by aGerman » 11 Nov 2019 10:45

Not sure about your folder structure. My test environment:
- A folder with the test script and 3 subfolders a, b, and c.
- Only folder b contains a PDF file (along with other files)

Code: Select all

@echo off &setlocal
for /d %%i in (*) do if not exist "%%~i\*.pdf" echo %%i
pause
Output:

Code: Select all

a
c
Drücken Sie eine beliebige Taste . . .
Steffen

Post Reply