File path conversions - Windows to Linux +GRAMPS

Markus Schönhaber ubuntu-users at
Thu Jul 8 07:06:59 UTC 2010

08.07.2010 02:27, NoOp:

> /home/<username>/<somename> Documents/My
> Pictures/<surname> Geneology/<surname>, <firstname>
> <middleinitial>/<sirname>, <firstname> <middleinitial>. Certificate of
> Birth.jpg
> But I'd like to figure out a way to clean all those up to no spaces,
> periods, commas, etc.
> Any suggestions on how I can batch convert all of those to
> path/filenames? Or am I doomed to having to go through each one
> individually?

Take a look at rename(1). The version of rename Ubuntu installs by
default allows you to specify a Perl-style regular expression that will
be applied to the given file names, for example like
rename -n 's/( |,)//' *.jpg

-n tells rename only to show what it would do.


More information about the ubuntu-users mailing list