renamen naar alleen alphanummeriek?

Ik wil bestandsnamen en foldernamen automatisch laten renamen naar alleen alphanummeriek. Dus zonder / ' • $ # etc. Dit om problemen met een linux / unix / windows machine te voorkomen. Ik heb gezocht op versiontracker maar kan geen programmatje vinden die dit kan. Iemand een suggestie ?

Misschien heb je hier wat aan:

If you wanted to be really thorough and handle files with `funny’
names (embedded blanks or whatever) you’d need to use

    Bourne Shell:

        for f in *; do
          g=`expr "xxx$f" : 'xxx(.*)' | tr '[A-Z]' '[a-z]'`
          mv "$f" "$g"

  The `expr' command will always print the filename, even if it
  equals `-n' or if it contains a System V escape sequence like `c'.

  Some versions of "tr" require the [ and ], some don't.  It
  happens to be harmless to include them in this particular
  example; versions of tr that don't want the [] will conveniently
  think they are supposed to translate '[' to '[' and ']' to ']'.

  If you have the "perl" language installed, you may find this
  rename script by Larry Wall very useful.  It can be used to
  accomplish a wide variety of filename changes.