Move all files to their own folder

Try this snippet, assuming all you've got in the currently directory is files (no directories):

for file in *
do
  mv "$file" "$file".tmp &&
  mkdir "$file" &&
  mv "$file".tmp "$file"/"$file"
done

Otherwise (tested only lightly):

find . -maxdepth 1 -type f -exec mv '{}' '{}'.tmp \; -exec mkdir '{}' \; -exec mv '{}'.tmp '{}'/'{}' \;

This worked on my test directory with a couple of arbitrarily named files, some of them with spaces.