Donate for a Beer!

splitbrain.org - electronic brain surgery since 2001

sanity.pl

sanity.pl renames all files in a directory to a sane name; it replaces spaces with underscores, removes semicolons, and replaces German umlauts.

The new version also lowercases .MP3 to .mp3 which makes some players much more happy.

I run it on my personal ftp-server via a nightly cron-job, because it's a pain in the *** to type something like get /my\ great\ file\ \ \with\ a\ lot\ of\ spaces.xyz on a commandline ftp client ;-)

Download

sanity.tgz

Changes:

  • 21.05.2005 – Added options to optionally strip brackets and convert to lowercase (creates DokuWiki compatible filenames)
  • 10.09.2003 – Sanity now decodes urlencoded characters like %20 and works on single files, too
  • 14.12.2001 – Sanity was updated. It doesn't overwrite existing files now anymore.