Batch rename files in bash

Add “razvan-” in front of all .txt files in a folder:

for f in *.txt; do mv -v "$f" "razvan-${f%}"; done;

 

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.