How to resolve mkdir : missing operand error in linux?

If you need the output of a command as a new variable, put the command between $(). Like this:

folderName=$(echo $files|awk -F. '{print $1} ';)

To see what you're doing, add another echo command to confirm that the folder name has been correctly constructed:

echo $folderName

before you do the mkdir.