I am trying to write a batch script that moves a selection of files into sub directories based on the file extension. EG dir contains
1.txt 2.bat 3.txt 4.usr 5.1.jfifj
I want the txt files moved into a txt folder, bat into a bat folder, usr moved into a usr folder, jfifj into the jfifj folder.
I could hard code it but there might be other file types going into the directory in the future also the extension can be more than 3 charecters and also the file name can contain more than 1 . (dot) eg 1.1.txt.
Thanks and Regards