User Tools

Site Tools


bash:files:rename_duplicate_files

BASH - Files - Rename duplicate files

Rename duplicate files so you get the latest copy and not a bunch of duplicates.

for i in */*/*\(1\)*; do mv -f "$i" "${i/ (1)}"; done

Example Result

`abba/forever_gold_(disc_1__abba_gold)/19-waterloo (1).mp3' -> `abba/forever_gold_(disc_1__abba_gold)/19-waterloo.mp3'
bash/files/rename_duplicate_files.txt · Last modified: 2022/06/13 12:32 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki