Friday, May 11, 2012

Swap Whitespaces/Underscores in Filenames

I have a folder where some of the files are name "like_this" and some are named "like this". I want to convert all the underscores in all the file names to spaces. Run this command in the directory where you want this to happen (you can swap the '_' and ' ' characters accordingly):

find . -depth|rename 's/\_/ /g'

No comments:

Post a Comment