Tuesday, 8 September 2009

Replace Spaces in Filenames

As noted in the previous post spaces in file names break many scripts so here is a quick script to replace all spaces in file names with an _
#!/bin/bash
find | while read FN;do mv "$FN" "`echo $FN | sed -e 's/ /_/g'`";done

No comments:

Post a Comment