--- /dev/null
+name: fixparanoia
+version: 1.0
+synopsis: <Project description>
+description: <Project description>
+category: Sound
+license: PublicDomain
+author: PHO
+maintainer: pho at cielonegro dot org
+build-type: Simple
+build-Depends: base, directory, pcre-light
+
+executable: fixparanoia
+main-is: Fixparanoia.hs
+ghc-options: -Wall
--- /dev/null
+#!/usr/local/bin/runhaskell
+import System.Directory
+import Text.Regex.PCRE.Light.Char8
+
+main :: IO ()
+main = do files <- getDirectoryContents "."
+ mapM_ fixIfNeedBe files
+
+fixIfNeedBe :: FilePath -> IO ()
+fixIfNeedBe fName
+ = case match (compile "^track([0-9]+)\\.cdda\\.wav$" []) fName [] of
+ Just [_, num]
+ -> do putStrLn (fName ++ " -> " ++ num ++ ".wav")
+ renameFile fName (num ++ ".wav")
+ _ -> return ()