Looping through files

Directory is a class not a variable which you can assign values.