Create folders & place images from X folder into the created folders | Acording to pathway instructions from txt file

Job ID: 37256311

Budget: $30 – $250 USD

I have a folder containing subfolders with .jpeg images. iCloud folder. They are all corrupted, can not be moved or viewed. I did create a list of the files from the folder using a cmd commando, so I know what category the images are in.

The images are available in the cloud and the phone however, so I downloaded them and placed them into a folder. .HEIC-format. Now, how do I recreate the subcategory structure, creating the folders and place each of the non-corrupted files into the different categories?

I can ofcourse manually create each subcategory, then search for the name(s) in X folder and move into the correct folders acording to the .txt file. This takes a very long time however.

Can this be automated in a smart way using some software or script?
Related categories: PHP Automation Software Engineering