Terminal script to create folders and copy files based on part of filename
If all your files follow the convention of dirname - the_rest_and_ext (have the - in the middle) you can use something like:

for f in *; do
   dir_name=`echo "$f" | sed 's/ -.*//'`
   mkdir -p "$dir_name"
   mv "$f" "$dir_name"
done


If all the files have the same extension, you can change the for to something like:

for f in *.ext; do


NOTE: make sure you know what you are doing.