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
letter_235.txt
the file should be called
RXR1234567_letter_235.txt
Could this be done from the command line (grep, rename)? The files are in various subdirectories.
Your thoughts will be appreciated (as always).