Rename multiple files, but only rename part of the filename in Bash [closed]
I know how I can rename files and such, but I'm having trouble with this. I only need to rename test-this in a for loop. test-this.ext test-this.volume001+02.ext test-this.volume002+04.ext test-this.volume003+08.ext test-this.volume004+16.ext test-this.volume005+32.ext test-this.volume006+64.ext test-this.volume007+78.ext If you have all of these files in one folder and you're on Linux you can use: rename 's/test-this/REPLACESTRING/g' * The result will be: REPLACESTRING.ext REPLACESTRING.volume001+02.ext REPLACESTRING.volume002+04.ext ... rename can take a command as the first argument. The