NAME sanename - Undo odd characters in file names SYNOPSIS sanename [-options] file [file2 file3 ...] sanename -usage Make names lower case sanename -low file [file2 file3 ...] Change all '_' to '-' if any sanename -e 'tr/_/-/' file [file2 file3 ...] DESCRIPTION Sanename changes characters in file names which are not composed of "[-._a-zA-Z0-9]" characters. See File::Name::Sanitize for what actually happens, around which this program is a wrapper. Use of that module is much encouraged as this program may disappear in future. OPTIONS Program Control Options -help | -usage Shows this message. -nomove | -n Do not actually move the files, just print the old given names and new sanitized ones. -quiet | -q Show only grave error messages. -verbose | -v Controls how much output is generated; more the output is when specified multiple times. * Only fatal error messages are generated 1 As 0, plus non-fatal error messages are shown 2 Default. As 1, plus converted file names are shown 3 As 2, plus OK/unchanged old file names are shown -exist=*ask*|*force*|*skip* -ask -- UNIMPLEMENTED -force -skip Controls the behaviour when sanitized new file name is as an existing file. If the new sanitized name is same as old given name, that is not considered to be an already existent file. Consider there are two files: *P^Q^R* and *P-Q-R*. The sanitized name for the first file, without the -lower option, would be *P-Q-R*. Since this soon-to-be file already exists, it creates a good situation for providing an option. The file name *P-Q-R*, without the -lower option, produces the same new name. Any further processing or file moving is skipped, except for any messages requested via -verbose option. ask -- UNIMPLEMENTED An alternative name is asked to enter. force Old given file is moved to the new calculated name, obliterating an already existing file. skip Default. Move old file to new name only if it does not exist. File name Affecting Options -want-hyphenation | -hyphen | -H Default: unset. Put a hyphen between alphabet and base 10 number sequences. -upper | -u Default: unset. Exclude [a-z] characters from the [-._a-zA-Z0-9] character set. -lower | -l Default: unset. Exclude [A-Z] characters from the [-._a-zA-Z0-9] character set. This option overrides -upper if both are given. To keep the case as is neither give -upper option nor -lower. < -pre-code | -pre | -e > *code string* Default: unset. Code to execute on each file BEFORE sanitizing with "File::Name::Sanitize::sanitize()". See -post-code for other details. < -post-code | -post > *code string* Default: unset. Code to execute on each file AFTER sanitizing with "File::Name::Sanitize::sanitize()", before moving old name to new. File name is available in both $file and $_; $dir contains the directory name, including the last slash. $path is the concatenated value of $dir and $file. Modified values of $_ and $dir is used as the new file path. Current directory is added before a file name if no other directory is specified. DEPENDENCY It needs Parv::Util::Compile module, part of Parv::Util module collection. Refer to File::Name::Sanitize for download location. VERSION and AUTHOR Parv, parv(at)pair(dot)com Version: 6.01 Modified: Jul 30 2006 Distribution and such This software is free to be used in any form only if proper credit is given. I am not responsible for any kind of damage or loss. Use it at your own risk. See Also See these fine perlpods too: * File::Copy * File::Name::Sanitize