Moving files to corresponding folders

I want to move a large group of files to a set of folders that are named after that file. For example

Folders:

HumptyDumpty
MaryHadALittleLamb
ItsyBitsySpider

Files in the same directory as the folders:

HumptyDumpty.txt
HumptyDumpty.mov
MaryHadALittleLamb.wmv
MaryHadALittleLamb.nfo
ItsyBitsySpider.mp4
ItsyBitsySpider.pdf

So,

HumptyDumpty.txt
HumptyDumpty.mov

Should be moved into the folder

HumptyDumpty

And,

MaryHadALittleLamb.wmv
MaryHadALittleLamb.nfo

Should be moved into the folder

MaryHadALittleLamb

And,

ItsyBitsySpider.mp4
ItsyBitsySpider.pdf

Should be moved into the folder

ItsyBitsySpider

How do I write a script for a button to do this?