XNView can do it all easily for you...but the images will be changed
Test: Open such a pic in XNView & press ALT-Enter: the EXIF data seems to be correct (72x72), but in the image there's 'Pixel per inch: '? ? ? x ? ? ?'; after using XNView's 'set dpi' command this is fixed.
So let XNView run through all your sub folders & let it store the corrected images in a new folder with exactly the same folder structure...
-> All the pic must be in a folder, no matter how much pics / sub folders you have there
-> Start XNView, call 'Batch processing' (CTRL-U), 'Remove all' to remove selected folders, then press 'Add folder'
-> All images (also in the sub folders) are listet
-> set 'Output directory' to a new, empty dir
-> check 'Keep subfolder structure', 'Keep original date/time...', 'Keep source format'
-> Adjust 'Format Options' to the settings you want (e.g. JPEG format:
keep EXIF data,
Quality)
-> set up the transformations you want (in the 'Transformations' tab): Set DPI -> 72 x 72
You can also save the settings as a script file for later usage...
It'll run some time... then you should have the whole folder structure with all the fixed images...
Remember: the images will be recalculated, so the image quality could be changed, backup your original files / work with a copy !