« BakeOff - The Blackjack 2 vs Moto Q Global | Main | How to make your Dell m1210 into a Mac (dual boot with Vista) »

Simple Bulk rename : A Bash file rename script

often I have to rename a whole set of files that have not processed correctly, to do this I rename them with Bash, a simple script to do this is :

for f in *_3; do mv "$f" "${f/_3/_0}"; done

this renames all files ending in _3 to the same filename but now ending in _0

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)