User Tools

Site Tools


bash:files:rename_duplicate_files

This is an old revision of the document!


BASH - Files - Rename duplicate files

Renames 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.1611664230.txt.gz · Last modified: 2021/01/26 12:30 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki