*}
codea teams

Batch Rename. Convert Spaces



Rename all the files in a directory and change all spaces in the filenames to underscores.

#!/bin/bash

ls | while read -r FILE
do
    mv -v "$FILE" `echo $FILE | tr ' ' '_' `
done