home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / bbs / mkill203 / maxikill.doc < prev    next >
Text File  |  1993-08-31  |  19KB  |  416 lines

  1. ***  **  Maxi*KILL 2.03<beta> by Erik Williams
  2. **  ***  SunFox Productions, Ltd.
  3. ***  **  Raleigh, North Carolina
  4. **  ***  (c) Copyright, 1993.  All rights reserved.
  5.  
  6. LAST REVISED:  March 24, 1993
  7.  
  8. NETWORK ADDRESSES:
  9.  
  10. AtariNet:   51:102/0 {Triangle Area AtariNet Host}
  11.             51:102/1 {SunFox's Realm BBS}
  12.             51:102/2 {SunFox's Mail Realm BBS}
  13. FidoNet:     1:151/167 {SunFox's Realm BBS}
  14.              1:151/169 {SunFox's Mail Realm BBS}
  15. GEnie:      SUNFOX (natch!)
  16.  
  17. A LITTLE ABOUT Maxi*KILL:
  18.  
  19.     Maxi*KILL was designed over three years ago as a third-party support
  20. programme for Shawn Smith's QWK reader, Maxi*Miser/ST.  The original
  21. versions were relatively primitive in that they only took a flat ASCII
  22. text file with a set of descriptor/path pairs and Maxi*KILL would
  23. merrily search those directories for files that matched the pattern and
  24. kill them.  I even put in two methods of operation...one that ask you
  25. for confirmation for every file found and one that would just go ahead
  26. and blow away the files without asking you anything.  It was crude, but
  27. it killed the QWK and REP files left after I had uploaded my replies to
  28. the QWK packer on the Twilight Zone and I was happy.
  29.  
  30.     A little over a year ago, I had a nasty little partition crash that
  31. just happen to trash all of my source code.  Guess what!  There went the
  32. source to Maxi*KILL as well.  I was fit to be tied as my only good backup
  33. didn't have the sources on there...but Maxi*KILL 1.20 did the job and I
  34. didn't bother updating it any more.
  35.  
  36.     I finally bit the bullet this week and sat down to rewrite Maxi*KILL
  37. and what you have on your system is the results of that.  Because my
  38. needs have changed, Maxi*KILL is almost a totally different looking
  39. programme than what I released over three years ago and it is a whole lot
  40. more powerful now than I had ever dreamed back then.
  41.  
  42.     Enjoy it...
  43.  
  44. WHO WOULD BENEFIT FROM MAXIKILL?
  45.  
  46.     The main audience for this programme will be BBS sysops who want to
  47. fine-tune their control over how they delete files automatically.  Because
  48. almost every FidoNet-style BBS is event-driven in one way or another,
  49. Maxi*KILL will allow the user to time the deleting of files to within
  50. *ONE SECOND* (not even BinkleyTerm's events are that good!) of running
  51. Maxi*KILL.  Maxi*KILL logs its action in a Binkley-style logging, so you
  52. can have Maxi*KILL merge its output with your regular Binkley logs if you
  53. wish.
  54.  
  55.     However, if you are not a sysop, don't despair!  Maxi*KILL can work
  56. for you as well...if you have files that you regularly delete, then this
  57. is the programme for you.  All you have to do is set up the configuration
  58. as you want and just run Maxi*KILL whenever you need to delete files.  It
  59. is really simple and really powerful.
  60.  
  61.     All in all, anyone who wants to take control of their file deleting
  62. will probably find some use in Maxi*KILL.
  63.  
  64. BEFORE I GO ANY FURTHER:
  65.  
  66.     As with any programme that plays around with your hard disks, the
  67. author (me!) takes no responsibility for what Maxi*KILL may do to your
  68. hard disk...if your system freaks out, it ain't my fault!  I use legal,
  69. documented stuff in Maxi*KILL and the code is so generic that it should
  70. run on *ANYTHING*.  It has been tested on a TT030 and a Mega4STE here
  71. at the Realm...and it runs fine.  It also runs fine in colour and 
  72. monochrome, so that shouldn't be a problem.  Essentially, my two
  73. machines are *THE* torture test for new programmes...if it runs on both
  74. of these machines without any problems, it will run on anything.
  75.  
  76.     There are no hidden routines to trash your hard disk or anything
  77. like that, but messed up configurations can really screw up the program.
  78. I'm not trying to frighten you or anything:  just configure Maxi*KILL
  79. like I tell you and you will do just fine.  Trust me.
  80.  
  81.     Another legal tidbit is that I retain all rights to this programme
  82. and it is a copyrighted piece of software.  Just because I distribute it
  83. as postcardware doesn't mean that it is public domain...it isn't.  You
  84. are allowed to publish it on your user group disks or distribute it to
  85. any BBS or online service provided you observe the following rules:
  86.  
  87.        -The entire archive must be intact.  That includes the programme,
  88.         the sample configuration file, and the documentation.
  89.  
  90.        -That if you charge a fee that it only cover the cost of the disk
  91.         itself.
  92.  
  93.        -That you do not disassemble or otherwise reverse engineer the
  94.         programme.  I'm willing to share sources with programmers who
  95.         want to see how I do things...like parsing and so forth.  It
  96.         isn't the greatest code, but it works.  All I ask if you use
  97.         the code in your programmes that you attribute me as a source
  98.         in your documentation!  I wouldn't mind seeing your code as
  99.         well...but that's not required.  :)
  100.  
  101. HOW MUCH IS THIS WORTH TO YOU?
  102.  
  103.     I'm not going to ask for much!  Maxi*KILL comes fully enabled so I
  104. will not expect you to send any money to me (though I'm not above
  105. accepting it if sent!) or pay me with GEnie gifts of time or any such
  106. nonsense.
  107.  
  108.     However, I have a bit of vanity like every other shareware programmer
  109. out there in that I like to see just how far my programme will go in this
  110. world.  What I would like is a *POSTCARD* from your hometown...you don't
  111. even have to put your address or anything personal on it.  Even if you do,
  112. I'm not going to bug you and try to sell all sorts of garbage to you or
  113. sell your name to every mailing list I can find (I'd hate it if that
  114. happened to me, so I'm not going to do it to you).  Mainly, it is just to
  115. satisfy my curiosity more than anything else...I just want to see how far
  116. Maxi*KILL gets distributed.
  117.  
  118.     You can't beat a deal like this!  Fourteen or so cents for a program
  119. like this?!?  I've got to be out of my mind (which is probably true!).
  120. What you do get if you send a postcard is someone willing to put special
  121. features into the programme...I'll support those people who support me
  122. in this postcardware project.  I have a lot of plans for Maxi*KILL and
  123. I'm willing to listen to ideas...and I'm not asking for much in return.
  124.  
  125.     Send your postcards to:
  126.  
  127.     Erik Williams
  128.     SunFox Productions, Ltd.
  129.     2801-4 Brigadoon Drive
  130.     Raleigh, North Carolina   27606-3051
  131.  
  132.     Thank you for your support.  Now, on with the documentation!
  133.  
  134.     I'm also available at those net addresses above for bug reports,
  135. gripes, and so on.  If you are on AtariNet or FidoNet, direct your
  136. netmail to 51:102/1 or 1:151/167, respectively.  The Mail Realm is my
  137. private, mail-only node and is more of an offline reader than anything
  138. else!  Thanks!
  139.  
  140. CONFIGURING THIS BUGGER:
  141.  
  142.     Configuring Maxi*KILL is a breeze as long as you do it *MY WAY*
  143. (you know, "there's the right way and the Army way, but dammit, we're doing
  144. it *MY* way!").  The syntax is simple and I've put a lot of code in to try
  145. to trap out as many possible syntax errors as I can, but even I could have
  146. missed a case or two.
  147.  
  148.     In general, the configuration file is a flat ASCII text file that is
  149. relatively free-form (I say this because it really doesn't matter what
  150. order these entries are in or the spacing, but the syntax must be
  151. observed exactly or unpredictable things may occur).  There are no
  152. provisions for comments...that will be a later addition to the programme.
  153.  
  154.     This configuration file *MUST* be named MAXIKILL.CFG and reside in the
  155. folder from which you run Maxi*KILL.  This is the only file that
  156. must remain in this directory and have this name...the rest of Maxi*KILL
  157. is user-configurable.
  158.  
  159.     The following is the list of acceptable configuration commands...all
  160. parameters associated with these commands are REQUIRED for Maxi*KILL to
  161. function correctly!  You must have LogLevel, LogEvent, and LogMaint
  162. defined at the very least or else the programme will crash when it tries
  163. to write to a closed file.  It would also be nice if you had at least one
  164. Event defined as that is the purpose of the programme!  ;)
  165.  
  166.     A word of warning:  all of these keywords and parameters are case
  167. sensitive with the exception of the <start_time>, <end_time>, <path>, and
  168. <pattern>.
  169.  
  170. CONFIGURATION FILE COMMANDS:
  171.  
  172. Event <day> <start_time> <end_time>
  173.      Kill <path> <filename_pattern>
  174. EndEvent
  175.  
  176.        The Event...EndEvent pair is extremely powerful and can time your
  177.        file deletions to within one second of running Maxi*KILL.
  178.  
  179.        The <day> parameter can be any one or a combination of the following
  180.        options:
  181.  
  182.              Mon = Monday
  183.              Tue = Tuesday
  184.              Wed = Wednesday
  185.              Thu = Thursday
  186.              Fri = Friday
  187.              Sat = Saturday
  188.              Sun = Sunday
  189.              Week = Monday through Friday
  190.              WeekEnd = Saturday and Sunday
  191.              All = All seven days
  192.  
  193.        The days are case-sensitive, so please use these abbreviations
  194.        exactly as you see them.  If you wish to use more than one of these
  195.        days in your Event, then join them together using the "|" character
  196.        with *NO* spaces in the specification.  For example:
  197.  
  198.        Event Mon|Wed|Fri 00:00:00 00:05:00
  199.            Kill g:\turbo\ turbo.log
  200.            Kill c:\turbo\ turbo.log
  201.        EndEvent
  202.  
  203.        This event will only run on Monday, Wednesday, or Friday.
  204.  
  205.        You can pipe together the Week, WeekEnd, and All specifiers as well
  206.        but be warned that the first "All" encountered will set the all of
  207.        of the days as valid days for the Event to be run and anything that
  208.        comes after the "All" will have no effect.
  209.  
  210.        You may also have as many Kills within an event as your memory
  211.        allows...I'm using a linked-list structure for the events and kills
  212.        which really saves memory over the old array-based format.
  213.  
  214.        Your date specifier is limited to 45 characters...that's why I added
  215.        the Week and WeekEnd specifiers to make specifying those multiple days
  216.        a bit easier for you.
  217.  
  218.        The <start_time> and <end_time> are twenty-four hour representations
  219.        of your starting and ending times respectively.  Each of these will
  220.        be eight characters long in the following format:
  221.  
  222.               hh:mm:ss
  223.  
  224.        It is essential that you follow this format exactly or my time
  225.        comparison routines may have unexpected results.  So, for example,
  226.        if you want a start time of 4:30p on the dot, just put in 16:30:00
  227.        for <start_time>.
  228.  
  229.        A word of warning:  you need to keep your times from crossing over
  230.        the midnight boundary or else unpredicted results may come of it.
  231.        So, avoid an Event like this:
  232.  
  233.               Event All 23:30:00 00:05:00
  234.                   Kill c:\turbo\ turbo.log
  235.               EndEvent
  236.  
  237.        The Kill definitions will be described below in its own section.
  238.        When a Kill is located within an Event, it will only be executed
  239.        if the time that Maxi*KILL was run is between or equal to the
  240.        starting or ending times of the event and the startup day is equal
  241.        to the event day (thus, if "Fri" is the day, then the event will
  242.        only run on Fridays and "All" means that it will run at the specified
  243.        time on *ANY* day and so on).  Otherwise, it will be ignored.
  244.  
  245.        Finally, all events must end with the EventEnd keyword.  This is my
  246.        marker that tells me this event definition is done and that I can
  247.        reset the parser to look for new keywords.  Also, this block-style
  248.        definition is easier for you to read and debug if there are
  249.        problems.
  250.  
  251. Kill <path> <pattern>
  252.  
  253.        The <path> is a simple path specification such as "c:\turbo\".  Note
  254.        that the trailing backslash is required...if you forget it, then
  255.        Maxi*KILL will assume it is looking at a file name one level higher
  256.        than where you wish to search which may cause problems.
  257.  
  258.        The <pattern> is the pattern of the file that you wish to delete.
  259.        This pattern can include the "*" and "?" wildcard characters or it
  260.        may be any legal filename.  The "*" replaces any number of characters
  261.        when trying to match filenames, the "?" replaces only one character.
  262.  
  263. LogFile  <path\filename>
  264.  
  265.        LogFile tells Maxi*KILL where and what file is to be used as the log
  266.        of Maxi*KILL's activities.  This is a full path and filename (as
  267.        opposed to the path of the Kill directive, so make sure that you
  268.        define it as such (i.e., "g:\logs\sunfox.log").
  269.  
  270.        The log is laid out in the BinkleyTerm style that is popular in
  271.        most FidoNet BBS software for the Atari and other platforms.  Here
  272.        is an example from an actual log file:
  273.  
  274. > 04 Mar 16:38:26 KILL Beginning events processing...
  275. ~ 04 Mar 16:38:26 KILL 
  276. ~ 04 Mar 16:38:26 KILL    Checking Event #1...
  277. ~ 04 Mar 16:38:26 KILL    Startup date/event date mismatch...no execution!
  278. ~ 04 Mar 16:38:26 KILL    Checking for next event...
  279. ~ 04 Mar 16:38:26 KILL 
  280. ~ 04 Mar 16:38:26 KILL    Checking Event #2...
  281. ~ 04 Mar 16:38:26 KILL    Startup date/event date match...now checking times!
  282. ~ 04 Mar 16:38:26 KILL    Startup time after end of event...no execution!
  283. ~ 04 Mar 16:38:26 KILL    Checking for next event...
  284.  
  285. LogLevel < {1,2,3} >
  286.  
  287.        LogLevel defines how much logging Maxi*KILL will do for you.
  288.  
  289.        LogLevel 1 is just the basic amount of logging that anyone gets...
  290.        Maxi*KILL tells you what it is doing and that is about it.
  291.  
  292.        LogLevel 2 will give you everything from LogLevel 1 plus a dump of
  293.        your event definitions like this:
  294.  
  295. + 31 Aug 22:29:58 KILL Configuration file has the following Event entries:
  296. + 31 Aug 22:29:58 KILL 
  297. + 31 Aug 22:29:58 KILL Event 1:
  298. + 31 Aug 22:29:58 KILL 
  299. + 31 Aug 22:29:58 KILL    Day(s):         Mon|Wed|Fri
  300. + 31 Aug 22:29:58 KILL    Starting Time:  00:30:00
  301. + 31 Aug 22:29:58 KILL    Ending Time:    18:45:00
  302. + 31 Aug 22:29:58 KILL 
  303. + 31 Aug 22:29:58 KILL    Event Kill Path:     k:\tempkill\
  304. + 31 Aug 22:29:58 KILL    Event Kill Pattern:  *.log
  305. + 31 Aug 22:29:58 KILL 
  306. + 31 Aug 22:29:58 KILL    Event Kill Path:     k:\tempkill\
  307. + 31 Aug 22:29:58 KILL    Event Kill Pattern:  *.lst
  308. + 31 Aug 22:29:58 KILL 
  309. + 31 Aug 22:29:58 KILL    Event Kill Path:     k:\tempkill\
  310. + 31 Aug 22:29:58 KILL    Event Kill Pattern:  *.txt
  311. + 31 Aug 22:29:58 KILL 
  312. + 31 Aug 22:29:58 KILL    Event Kill Path:     k:\tempkill\
  313. + 31 Aug 22:29:58 KILL    Event Kill Pattern:  *.tpl
  314. + 31 Aug 22:29:58 KILL 
  315. + 31 Aug 22:29:58 KILL EndEvent 1
  316. + 31 Aug 22:29:58 KILL 
  317. + 31 Aug 22:29:58 KILL Event 2:
  318. + 31 Aug 22:29:58 KILL 
  319. + 31 Aug 22:29:58 KILL    Day(s):         Thu
  320. + 31 Aug 22:29:58 KILL    Starting Time:  16:22:00
  321. + 31 Aug 22:29:58 KILL    Ending Time:    23:25:00
  322. + 31 Aug 22:29:58 KILL 
  323. + 31 Aug 22:29:58 KILL    Event Kill Path:     g:\misc\
  324. + 31 Aug 22:29:58 KILL    Event Kill Pattern:  *.txt
  325. + 31 Aug 22:29:58 KILL 
  326. + 31 Aug 22:29:58 KILL EndEvent 2
  327. + 31 Aug 22:29:58 KILL 
  328. + 31 Aug 22:29:58 KILL Event 3:
  329. + 31 Aug 22:29:58 KILL 
  330. + 31 Aug 22:29:58 KILL    Day(s):         All
  331. + 31 Aug 22:29:58 KILL    Starting Time:  00:00:00
  332. + 31 Aug 22:29:58 KILL    Ending Time:    23:59:59
  333. + 31 Aug 22:29:58 KILL 
  334. + 31 Aug 22:29:58 KILL    Event Kill Path:     g:\logs\
  335. + 31 Aug 22:29:58 KILL    Event Kill Pattern:  *.ltr
  336. + 31 Aug 22:29:58 KILL 
  337. + 31 Aug 22:29:58 KILL EndEvent 3
  338.  
  339.        LogLevel 3 will give you everything from LogLevel 2 plus a dump of
  340.        your log file maintenance schedule like this:
  341.  
  342. + 10 Mar 16:09:48 KILL Configuration file has the following LogMaint setting:
  343. + 10 Mar 16:09:48 KILL 
  344. + 10 Mar 16:09:48 KILL    Day(s):         All
  345. + 10 Mar 16:09:48 KILL    Starting Time:  00:00:00
  346. + 10 Mar 16:09:48 KILL    Ending Time:    23:59:00
  347.  
  348.        I recommend that you start out at LogLevel 3 to make sure you have
  349.        everything defined correctly...then you can drop Maxi*KILL down to
  350.        LogLevel 1 once everything is working smoothly.  LogLevel numbers
  351.        other than 1-3 are not supported at this time.
  352.  
  353. LogMaint <day> <start_time> <end_time>
  354.  
  355.        LogMaint was added to allow easy maintenance of the log file.  For
  356.        obvious reasons, the log file was the only file that could not be
  357.        deleted by Maxi*KILL and an attempt to try deleting it using a Kill
  358.        or Event usually ended up crashing the machine!
  359.  
  360.        LogMaint follows the same rules as the Events in terms of the format
  361.        of the <day>, <start_time>, and <end_time>.  If the day matches the
  362.        system date and the system time is between the start and end times
  363.        of LogMaint, then the log file will be reinitialised and will start
  364.        from scratch.  Otherwise, any logging will be appended to the
  365.        existing log file.  Again, avoid going over the midnight boundary
  366.        when setting your LogMaint times.
  367.  
  368.        If you have a logs folder in which all your log files have the same
  369.        extender, then you might want to give your Maxi*KILL log a unique
  370.        extender so that you may have a Kill definition to delete your other
  371.        log files if you so desire.
  372.  
  373. Here is a sample MAXIKILL.CFG:
  374.  
  375.     Here is the MAXIKILL.CFG that helped to create the log listings as
  376. given above for LogLevel 4.  It will also show you how you should
  377. create your own MAXIKILL.CFG.
  378.  
  379. ----8<----------------------------------------------------------snip!
  380.  
  381. LogLevel  4
  382.  
  383. LogMaint  All 00:00:00 23:59:00
  384. LogFile   g:\turbo\text\sunfox.log
  385.  
  386. Kill g:\turbo\ turbo.log
  387.  
  388. Event All 00:30:00 18:45:00
  389.    Kill k:\tempkill\ *.log
  390.    Kill k:\tempkill\ *.lst
  391.    Kill k:\tempkill\ *.txt
  392.    Kill k:\tempkill\ *.tpl
  393. EndEvent
  394.  
  395. Event Thu 16:22:00 23:25:00
  396.    Kill g:\misc\  *.txt
  397. EndEvent
  398.  
  399. Event Thu 16:00:00 19:05:00
  400.    Kill g:\misc\  *.ls?
  401. EndEvent
  402.  
  403. ----8<----------------------------------------------------------snip!
  404.  
  405. THHHH...THHHH...THAT'S ALL FOLKS!
  406.  
  407.     That's it...that's all there is to configuring Maxi*KILL.  It's so
  408. simple even *I* could do it...and I'm just the programmer!  If you like
  409. what you see and use it, please send the postcard.  If you find a bug,
  410. let me know and I'll fix it.  I'll even take feature requests from
  411. people who send me postcards!  Use it, have fun, and enjoy!  :)
  412.  
  413. Erik Williams
  414. SunFox Productions, Ltd.
  415. Raleigh, North Carolina
  416.