In case you have an established folder organization right under WordPress media library, and you want to keep a record, you can use the Backup and Restore tool.
Here’s what your backup file might look like. Depending on your number of files and folders, the number of attachments can be huge.