I have a pdf files in the format:
Author-YYYY-rest_of_text_seperated_by_underscores.pdf
John-2010-some_file.pdf
Smith-2009-some_other_file.pdf
I need to rename the files so that the year is first e.g.
YYYY-Author-rest_of_text_seperated_by_underscores.pdf
2010-John-some_file.pdf
2009-Smith-some_other_file.pdf
So that would mean moving the 'YYYY-' element to the start.
I do not have unix 'Rename' and must rely on sed, awk etc.I happy to rename inplace.
I have been trying to adapt this answer not having much luck. Using sed to mass rename files