https://www.tenforums.com/backup-restore/190666-how-can-i-copy-all-images-pc-while-preserving-folder-structure.html

The Quest: A friend’s grandfather passed away and he has 2 external hard drives filled with backups and files. Including a lot of pictures organized into many many folders and subfolders. A friend wanted them all on their iPad so they could sort through them.

The Problem: Using Windows 10, I opened the thumb drive and I can easily search for all pictures (kind:=picture) and Windows shows me all images on the backup drive. But I can’t just copy them all and paste them to a thumb drive or something, all those folder/directory structures will be lost. It’ll be a giant chaotic mess, not to mention filename conflict madness.

The Solution: Credit where credit is due, idgat on tenforums.com showed an awesome robocopy.exe (it’s bundled with Windows 10, who knew…) trick to do just this:

“robocopy F:\ E:\johnsphotos /Copy:DAT /s *.jpeg *.jpg *.png *.gif /a-:rsh /r:0 /w:0”

Nice trick. Copies over all those files while maintaining the directory structure.