NAME mvre - MoVe files based on given Regular Expressions SYNOPSIS mvre -usage mvre -out-dir *directory* regex mvre [ *options* ] [ -dry-run ] [ -in-dir directory ] < -out-dir | -od > directory regex [ regex 2 ] [ regex 3 ] ... DESCRIPTION Version: 0.61 - Dec 18 2003 In default mode, mvre moves file located in the current directory, matching (Perl) regex, to directory specified by -out-dir. An output directory is required in all cases. See -out-dir and -out-find-path options. Files to be moved, also referred as "input files", are specified either via -in-select option and/or as argument(s) given after all the options. Order of input selection regex, *-in-select* or *-select* option, and output directory specified is important. One-to-one relation exists between each regex to select input files and the output directory, either explicitly specified or found in path specified via *-out-file-path* option. OPTIONS Program Control -dry-run | -n Show which files will be moved to where, instead of actually moving anything. -help | -usage | -h Show this message. -quiet | -q See messages related to only grave error conditions. -verbose | -v Control verbosity. Specify -v or -verbose multiple times to increase verbosity. Default is 1; all, grave or minor, error conditions are signaled. -version | -V Show version. Combined Input & Output Options This set of options is shared between both *Input Options* and *Output Options*; do see the individual sections. -depth | -D Process all the files in a directory before going in any other directory or doing anything with the directory. -follow | -L Follow symbolic link. Default is to skip. -follow-fast | -ff See *File::Find* documentation as i, the author, fail to understand how it is different than just *-follow*. This option is provided for those who understand its description. To quote... This is similar to "follow" except that it may report some files more than once. It does detect cycles, however. Since only symbolic links have to be hashed, this is much cheaper both in space and time. If processing a file more than once (by the user's "wanted()" function) is worse than just taking time, the option "follow" should be used. < -ignore | -i > *regex* Ignore *files* matching the regex. Multiple regexen can be specified as "-i regex-1 -i regex-2". < -select | -s > *regex* Select *files* matching the regex. See *-ignore* option to specify multiple patterns. -select-args | -S Use arguments, after the options, as patterns to select both input and output files. This option allows to skip repetition of *-select*, *-in-select*, and/or *-out-select* for each pattern given. < -type | -t > *dir* | *file* Type of file to select. Default file type is *file*. THIS SETTING NEEDS TO ACCOMMODATE OTHER FILE TYPES. Perhaps some time in future... Input Options < -in-dir | -id > directory Specifies directory to start looking for input files matching given regex(en). Default is current directory. Multiple directories can be specified "-id dir-1 -id dir-2". Each directory is assumed to go with each input file pattern. -in-depth | -iD Process all the files in a input directory before going in any other directory or doing anything with the directory. -in-follow | -iL Follow symbolic link related to input files. Default is to skip. -in-follow-fast | -iff See *Combined Input & Output Options*; applies only to input files. < -in-ignore | -ii > *regex* Ignore input *files* matching the regex. Multiple regexen can be specified as "-i regex-1 -i regex-2". < -in-select | -is > *regex* Select input files matching the regex. See *-ignore* option to specify multiple patterns. < -in-type | -it > *dir* | *file* Type of file to select. Default file type is *file*. Output Options One of -out-dir, -out-find-path options is required in all cases. < -out-dir | -od > directory Specifies the name of directory to be created to move input files. If only one directory is specified, then all the input files will be moved to that directory. If the given output directory does not exist, it will be created. See *-in-dir* option syntax to specify multiple directories. < -out-find-path | -ofp > path Specify the directory path in which to find output directories based on -out-ignore and/or -out-select. See *-in-dir* option syntax to specify multiple directories. -out-follow | -oL Follow symbolic link related to output files. Default is to skip. -out-follow-fast | -off See *Combined Input & Output Options*; applies only to output files. -out-depth | -oD Process all the files in a output directory before going in any other directory or doing anything with the directory. -out-follow | -oL Follow symbolic link. Default is to skip. -out-follow-fast | -off See *Combined Input & Output Options*; applies only to output files. < -out-ignore | -oi > *regex* Ignore output files matching the regex. Multiple regexen can be specified as "-o regex-1 -o regex-2". < -out-select | -os > *regex* Select output files matching the regex. See *-ignore* option to specify multiple patterns. < -out-type | -ot > *dir* | *file* Type of file to select. Default file type is *file*. -overwrite | -f Specify -overwrite to write over the preexisting files. Default is not to overwrite. SEE ALSO find(1) File::Find(3) AUTHOR, LICENSE, and such Parv, parv(at)pair(dot)com Disclaimer: This software is free to be used in any form only if proper credit is given. I am not liable for any kind of harm or loss; use it at your own risk.