Bulk upload images with custom URL

I am running a library system on WordPress. Right now, my book cover images are saved like this:

I want to change this to /wp-content/uploads/library/[book_barcode].jpg, but this would also be fine:

I have a bunch of other images, so I can’t change the entire organization of my media folder. I will eventually have thousands of book cover images, so doing each one individually would be tedious. Is there any quick way to bulk upload?