I've got a need to recursively rename several thousand files on a CentOS 7 machine currently in the format of:
(32-64 alphanumerics)_various special characters.wav
In short, I would like to recursively remove the
_ up to the
.wav extension from all files 3 levels deep (NOTE: All extensions are
/home/user/recordings/TEST/december/157A757989F047C3AC2EC3499B4D04A5_7075276189 by firstname.lastname@example.org @ 8_44_52 AM.wav /home/user/recordings/test/october/28D1E1840DE24D9DB4CF6D1A707533F6337C2DDE_2018690759 by email@example.com @ 1_26_55 PM.wav
I've searched a great deal and have seen many ways to modify other parts of the filename but not retain everything before a specific character (
_) and the extension.
Thanks in advance for any assistance.