I would like to batch rename files (*.txt) by inserting a number of the format 'RXR1234567' (RXR+7digits) [if such number (and ideally only one) is found in the text] at the front of the filename, e.g. instead of
the file should be called
Could this be done from the command line (grep, rename)? The files are in various subdirectories.
Your thoughts will be appreciated (as always).