I am trying to move files to a corresponding folder based on their filename in Python. There are 3 identifiers, the genre i.e. "DRAMA", the director i.e. "von Trier", and the movie name i.e. "Melancholia". So the file "DRAMA von Trier Melancholia" would need to be moved to say, C:/shared/com/movies/DRAMA/Melancholia/von Trier. There are many files located that need to be moved, so I would rather not hard code the locations/do it 1 by 1. Here is what I have so far which lists all the files I want moved, but does not actually move them.
import os
import shutil
import fnmatch
for dirpath, dirs, files in os.walk('C:/shared/com/movies/'):
print dirpath
print dirs
print files
for filename in files:
if filename.endswith('*.mov'):
shutil.move('') #not sure how to code this to have it move based on paramaters rather than hard coding it