An example would be:
Folder 1:
a.pdf
b.pdf
Folder11
c.pdf
Folder 2:
a.pdf
b.pdf
Folder21:
c.pdf
printing all files between folders
And the cmd would have a way to find the file only putting part of the words? Example
TEXT : ABC*.PDF
PRINT ABCDF.PDF
1. To loop over multiple files recursively:
FOR /f "tokens=*" %%F in ('dir /s /b *.pdf') DO echo "%%F"
dir /s /b *.pfd
finds all pdfs (*.pdf), in all subdirectories (/s), in bare format - ie just the path name (/b)"tokens=*"
adds the whole line into %%F regardless of white spaces / other tokens2. To print from command line use: From this question
AcroRd32.exe /t "C:\Folder\File.pdf" "Brother MFC-7820N USB Printer" "Brother MFC-7820N USB Printer" "IP_192.168.10.110"
Note: Path to AcroRd32.exe must be in your path environment variable
3. Putting it all together -- edit -- 'I've added taskkill to close acrord32 after printing
FOR /f "tokens=*" %%F in ('dir /s /b *.pdf') DO AcroRd32.exe /t "%%~F" "Brother MFC-7820N USB Printer" "Brother MFC-7820N USB Printer" "IP_192.168.10.110" & taskkill /IM AcroRd32.exe