For this task you cannot use that style of dataset. Instead store all the images in a single folder. Now how you get the information that it belongs to 85% folder B depends on you.
You can have this info in image file names, or create a separate csv file matching each filename to prob.
Then you would have to create a new dataset class.