Let’s say, for example, you have a directory of files named x01-001; x01-002; x02-001; x02-002; x03-001… and so on.
I want to create subdirectories for each ‘x’ iteration and move each set to the corresponding subdirectory. My loop would look like this:
for i in {1…3}; do mkdir Data_x0$i && mv x0$i* Data_x0$i; done
I’ve also been using it if I need to rename large batches of files quickly.
The downvotes are because your “solution” is not based in the reality that the rest of us live in.