Batch renaming replace with part of the original file name DOS and Bash
===

I know this has been covered many times, but i still can't seem to get a good solution to this particular aspect.  I have the same problem in both bash and DOS.  I have a file of many .csv files named abcYYMMDDf.csv and i want to change the file name to the YYMMDD part which corresponds to the date it was created.

In bash i understand the rename function, and the * wildcard i tried variations on
rename abc*f.csv *.csv abc*
thinking that the * would stand in for YYMMDD but obviously it didn't
I saw another method involving selecting s/([a-z]*) but that would just take the whole file name surely?

In DOS i tried  ren osp*f.csv *.csv

Sorry in advance
