|Description:|| Goes through directories etc and collects information on files etc. |
|Last Edit:|| 05/12/13|
Copyright © 2006 Richard J. Edwards - See source code for GNU License Notice
See SLiMSuite Blog for further documentation. See
rje for general commands.
<1> File Monster: [
Goes through directories etc and collects information on files etc. "
scavenge=T" will output a file containing
relevant file names and locations, ages and sizes. "
monster=T" will compare for identical files and farm them off
into another directory for possible deletion.
<2> DirSum: [
Goes through directories and subdirectories and summarises the number of files and subdirectories they contain. If a
directory contains less than X subdirectories [
dircut=X] then the subdirectories of that directory will also be
summarised. Output is in the form: PATH,files,subdir
<3> Rename: [
Renames all the chosen files [filelist] with the given prefix [
prefix=X] into outdir. If
usedate=T, dates will be
added to the prefix (e.g. outdir/prefixdate_num) otherwise new names are just outdir/prefix_num.
<4> Fix line endings [
Replace Mac \\r with \\n line endings in place with option to backup old file (unless
File = File (or directory) name (no path)
Parent = Parent directory from DirList
Folder = Path containing file (or directory)
Type = File extension (or "DIR")
Size = Size in bytes
Date = Age converted to human readable string
Age = Age of file (MTime) in seconds
CTime = String representation of Creation Time
MTime = String representation of Modified Time
ATime = String representation of ATime
FilePath = Full path to file
filelist=X,Y,..,Z : List of files of interest. Can have wildcards. [
dirlist=LIST : List of directories to look in, in order of preference good -> bad for duplicates. [
subfolders=T/F : Whether to look in subfolders [
stripnum=T/F : Whether files may have -XXX numerical suffix from renaming, which should be stripped [
File Monster Commandline
oldmonster=T/F : Whether to run old File Monster (V1.x). Will be retired once update complete. [
outdir=PATH : Output directory for renamed/reorganised files [
dumpdir=PATH : Directory in which to dump redundant files (don't move if "None") [
cleanup=T/F : Whether to delete empty directories (and move/delete stripnum) [
cleanfiles=LIST : List of hidden files to delete during cleanup if directory seems empty [
sizematch=X : Size % similarity threshold to count as match [
skiplist=LIST : List of filenames to skip [
organise=X : File reorganisation mode (none/date/month/compile) [
orgprefix=X : Prefix for organised outdir subdirectories [
redundancy=T/F : Whether to check/rate redundancy for scavenge etc. [
scavenge=T/F : Whether to perform collation of file information [
searchid=X : ID for search - allows multiple searches to be compared easily [
dirsum=T/F : Whether to perform summary of directory contents [
dircut=X : Max number of subdirectories to have and still delve into them [
dirdepth=X : Max depth of subdirectories to delve into. Negative = all. [
extlist=LIST : List of file extenstions to report individual stats for [
fixendings=FILELIST : Replace Mac with UNIX line endings for FILELIST (wildcards allowed) 
File Monster Commandline
monster=T/F : Whether to perform monster cleanup of redundant files [
gooddir=LIST : List of "good" directories to be automatically kept if i<1 (including subdirs) 
baddir=LIST : List of "bad" directories to be automatically screened if i<1 (including subdirs) 
keepnew=T/F : Preferentially keep newer files of same size if good/bad status equal [
purgelist=LIST : List of filenames (allowing wildcards) to purge (move/delete) [
rename=T/F : Whether to rename files [
sortby=X : Whether to sort by date or name [
prefix=X : Text prefix for new file names 
usedate=T/F : Whether to use date in new name [
History Module Version History
# 0.0 - Initial Compilation.
# 1.0 - Initial Working version
# 1.1 - Broadened away from strict extension-based scavenging to whole file names with wildcards
# 1.2 - Added DirSum function and updated FileMonster slightly.
# 1.3 - Added redundant file cleanup
# 1.4 - Added skiplist and purgelist
# 1.5 - Added rename function (to replace rename.pl Perl module)
# 1.6 - Minor bug fix.
# 2.0 - Major reworking with new object making use of rje_db tables etc. Old functions to be ported with time.
# 2.1 - Added dirsum function.
# 2.2 - Added fixendings=FILELIST to convert Mac \\r into UNIX \\n