I have a directory in which I have lot of files in this format only. Below are just examples for two of my files.
file_948_of_2000_push_data_12345.log
file_950_of_2000_push_data_12345.log
As you can see only difference is this file number 948
and 950
. Now I want to rename all these files in this particular format as shown below:
files_948.log
files_950.log
What is the best way I can do this?