Homelab, Linux, JS & ABAP (~˘▾˘)~
 

[Terminal] F2 – Command-line batch renaming tool

Project: https://github.com/ayoisaiah/f2
Wiki: https://github.com/ayoisaiah/f2/wiki
Installation: https://github.com/ayoisaiah/f2/wiki/Installation

curl -LO https://github.com/ayoisaiah/f2/releases/download/v1.6.1/f2_1.6.1_linux_amd64.tar.gz
tar -xvzf f2_1.6.1_linux_amd64.tar.gz 
chmod +x f2 
sudo mv f2 /usr/local/bin 
rm f2_1.6.1_linux_amd64.tar.gz 

Renaming a file from ‘img’ to ‘Image’

# test run
f2 -f 'img' -r 'Image'
# performing the actual renaming
f2 -f 'img' -r 'Image' -x
# undo the changes
f2 -u -x

Or renaming episodes from 01_S1.MyEpisode.mp4 to S01E01.MyEpisode.mp4

f2 -f '.._S1' -r 'S01E%02d'

Leave a Reply

Your email address will not be published. Required fields are marked *