If we want to create a new folder for each every jpg in a directory, see below:
jpg
for x in ./*.jpg; do mkdir "${x%.*}" && mv "$x" "${x%.*}" done