I have several directories with files out of sequence because the titles are displayed before the file number. I want to match and replace the end of all the files, minus the extension, so the number is at the beginning like so.
From this;
A guide to perfect eggs-456704.mp4
Boil an egg-456702.mp4
How to ruin scrambled eggs-456703.mp4
Make green eggs and ham-456701.mp4
Poached eggs-456705.mp4
To this:
456701-Make green eggs and ham.mp4
456702-Boil an egg.mp4
456703-How to ruin scrambled eggs.mp4
456704-A guide to perfect eggs.mp4
456705-Poached eggs.mp4
The titles are random in length for each file with spaces, the numbers are 6 digits before the ".mp4" extension but preceded by a dash after the title.