This doesn't sound like a big problem. It can all be done in straight AppleScript. Try something like:
set base_folder to "path:to:base" -- this is the top of your directory tree
set textFileContents to (read file (choose file with prompt "Select the list file"))
set fileList to paragraphs of textFileContents
set oldDelims to my text item delimiters
set my text item delimiters to ","
repeat with eachFile in fileList -- process each line
set filename to text item 1 of eachFile
set dirName to text item 2 of eachFile
tell application "Finder"
move (file filename of (folder base_folder)) to (folder dirName of folder base_folder)
The concept here is that the script first asks for the data file that lists the filename/folder combinations in CSV format. It then breaks that file data into paragraphs, and divides each paragraph into two variables based on the comma.
For each paragraph it extracts the filename and directory name parameters, then tells the Finder to move the corresponding file to the corresponding subdirectory name.
There's no error checking here, so missing fields in the CSV file, or missing files or subdirectories will throw an error, but those are addressable issues if you encounter them.