I'm looking to rename a lot of files that contain spaces in the file name while keeping the string of numbers intact. The numbers are not sequential and the string before and after the numbers are not the same for all the files. I want to make the string preceding the numbers the same for all the files.
100 foo_1.ext 200 foo_2.ext 201 foo_3.ext
100.ext 200.ext 201.ext