untested
for i in *.txt *.html
do
mv "$i" "${i%.*}.directory/$i"
done
Run this in same directory where you are having files.
untested
for i in *.txt *.html
do
mv "$i" "${i%.*}.directory/$i"
done
Run this in same directory where you are having files.