Move files into folders

I have a set of files:

.\Cat.txt

.\Dog.txt

I want to end up with this:

.\Cat\Cat.txt

.\Dog\Dog.txt

Solution:

for %i in (*) do md "%~ni"

for %i in (*) do move "%i" "%~ni"
Move files into folders was last modified: May 15th, 2018 by tabcom