I would like to rename my files using Bash by removing 4 characters in the middle.
Original file names:
dwe_hiul123456.pdf dwe_lkyd345876.pdf dwe_ythn157843.pdf I want to remove the 4 letters in the middle so the new file names would be:
dwe_123456.pdf dwe_345876.pdf dwe_157843.pdf The 4 letters will always follow the _ and there will always be one _ in the file name. All of the file names are the same length the the four characters I want to remove are in the same place.
I'm really new to this and don't know what version of anything I am using other than I am using Windows 10. I was trying to do this through the Git Bash command Window.
_in the filename? Is there exactly one_in the filenames? Please update the question when answering.