Did you know that QV has a help which is worth to look at?
Assuming you have a basic knowledge of Qlikview and it's scripting language:
for each vMainFolder in '\\this\is\your\first\MainFolder', '\\this\is\your\second\MainFolder', ..., '\\this\is\your\n-th\MainFolder'
for each vCSVfile in filelist($( vMainFolder)&' \DATA\*.csv')
'$(vCSVfile)' as CSV_Name,
'$(vMainFolder)\DATA\' & jpg_filename_found_in_your_csv as JPG_Name
for each vJPGfile in filelist($( vMainFolder)&' \*.jpg')
[never tested loading jpg-files]
hope this will help a little bit.