User Tools

Site Tools


sw:sanity

sanity.pl

Sanity is a Perl script to rename files and directories to sane names. It strips special chars and whitespaces and converts german umlauts to their ASCII equivalents.

:!: This tool is probably only useful if your locale is set to ISO-8859-1

Usage:

$>  sanity.pl [options] <file(s)>

The argument can be files and directories. Directories will be changed recurseively. If a renamed version of a file already exists the renaming will be skipped.

Options:

  -l convert to lowercase
  -e extended cleaning (removes brackets as well)

Example:

The following will recursivly convert all files in the directory data to a format compatible with DokuWiki:

$> sanity.pl -l -e /path/to/data
sw/sanity.txt · Last modified: 2005/10/05 07:55 by 127.0.0.1