File path conversions - Windows to Linux +GRAMPS
Markus Schönhaber
ubuntu-users at list-post.mks-mail.de
Thu Jul 8 07:06:59 UTC 2010
08.07.2010 02:27, NoOp:
> /home/<username>/<somename>_xml.gpkg.media/My 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.
--
Regards
mks
More information about the ubuntu-users
mailing list