home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / fileutil / fdel_103.arj / FDEL.DOC < prev    next >
Encoding:
Text File  |  1990-10-04  |  7.1 KB  |  151 lines

  1.  
  2. FDEL -- a delete-by-days file utility copyright (c) 1989/90 by M. Kimes [XBBS]
  3. ==============================================================================
  4.  Usage: FDEL Command Pattern [#Days] <-EExclude_File> <-LList_File> <-N>
  5.        (Command=DELETE LIST or TOUCH)      (? for a help screen)
  6.  
  7.  
  8.                    Updated docs for version 1.3
  9.  
  10.  
  11. FDEL is intended to make your upload/download areas self-maintaining.
  12. It will delete files by age according to their file date stamp.  You
  13. can also list the files (instead of deleting them) to a text file, which
  14. you can then review and/or post for reading by your users so they know
  15. what is slated for deletion.  A final twist is added with the Exclude
  16. file, a text file containing the fully qualified pathnames of files
  17. which should not be deleted even if they meet the date criterion.
  18.  
  19. You can run FDEL with the command line arguments ? or H to get a help
  20. screen (i.e. "FDEL ?" or "FDEL H").  Its use is fairly simple, at least
  21. once you get the hang of it.  Let's take a pratical example:
  22.  
  23. Suppose you have a directory (C:\BT\NODELIST\) in which you keep Nodelists
  24. and Nodediffs available for download.  You want to kill them off after 14
  25. days in the directory (this should always leave two nodediffs and two
  26. nodelists if you get them once per week).  In its simplest form, the FDEL
  27. command line would be
  28.  
  29. FDEL DELETE C:\BT\NODELIST\NODE*.* 14
  30.  
  31. This would delete any files in C:\BT\NODELIST that matched the pattern
  32. NODE*.* if they were 14 or more days old.  If you had other files
  33. besides nodediffs and nodelists in the directory that matched that
  34. pattern, you might run FDEL twice with more specific (NODELIST.* and
  35. NODEDIFF.*) patterns.
  36.  
  37. Now lets get a little more complicated.  Suppose you want to list the
  38. files without deleting them, just to check and see what would be deleted
  39. before you trust FDEL to do its auto-deletion.  Use
  40.  
  41. FDEL LIST C:\BT\NODELIST\NODE*.* 14 -LTODELETE.LST
  42.  
  43. This will list all the files that would have been deleted in the file
  44. TODELETE.LST (in the default directory since we didn't specify a path).
  45. If you added the -N command line parameter, FDEL would automatically
  46. exclude the newest matching file, and refuse to run if only one matching
  47. file were available (good for protecting a nodelist in case the nodediff
  48. didn't make it when it should have).
  49.  
  50. Another example --  Let's say that you have a private nodelist in the
  51. directory that you want to protect.  This file is named NODELIST.PVT.
  52. Create a text file called NODELETE.LST and put this line in it:
  53.  
  54. NODELIST.PVT
  55.  
  56. If you now run FDEL with the command line
  57.  
  58. FDEL DELETE C:\BT\NODELIST\NODE*.* 14 -ENODELETE.LST
  59.  
  60. FDEL will delete any matching file older than 14 days EXCEPT
  61. NODELIST.PVT.  Since it's listed in the Exclude file NODELETE.LST (and
  62. we told FDEL to look at it with the -E<filename> argument), it's
  63. excepted from auto-deletion.  Exclude files can contain multiple
  64. filenames, one per line.
  65.  
  66. Exclude and List files are limited to 5040 entries each.
  67.  
  68. One final command is available to FDEL.  You can "Touch" a file's date
  69. stamp so that it is set to the current date.  The #Days parameter is not
  70. needed in this case.  Back to protecting NODELIST.PVT in a different
  71. manner, you could run FDEL with this command line BEFORE your delete
  72. run:
  73.  
  74. FDEL TOUCH C:\BT\NODELIST\NODELIST.PVT
  75.  
  76. You can have FDEL list the files while it deletes or touches them with
  77. something like
  78.  
  79. FDEL DELETE C:\BT\NODELIST\NODE*.* 14 -LDELETED.LST
  80.  
  81. FDEL WILL DELETE the files, but it also lists them in DELETED.LST, since
  82. we passed the -L<filename> argument.  Keep in mind that you can direct a
  83. List or Exclude file to a certain directory by including path
  84. information (i.e. -LC:\LISTS\DELETED.LST).  Also remember that List
  85. files will be appended to if they are existing, rather than overwritten.
  86. And, although we have always used the words DELETE, LIST or TOUCH in the
  87. Command position (right after the FDEL filename), you can use just the
  88. first letter (L instead of LIST, D instead of DELETE, T instead of
  89. TOUCH).
  90.  
  91. FDEL 1.3 has a new option, CUT.  CUT will trim a directory down to the
  92. newest X number of files (where X is the number you pass in the #Days
  93. slot--for CUT, it's the number of files to leave).  CUT kills the oldest
  94. files and leaves the newest, which works out nice if you touch file
  95. datestamps when they're uploaded (or before moving them to their final
  96. resting place).  If you pass the -L option for listing files, CUT lists
  97. instead of CUTting, so you can test to see if you've got it set the way
  98. you want it set.  Even -LNUL will give you a list on the screen for a
  99. quick check.  This makes it relatively simple to set up self-maintaining
  100. file areas.  NOTE that CUT doesn't delete if it's Listing, but DELETE
  101. DOES!
  102.  
  103. FDEL is written in QuickBASIC 4.5 compiled so that it doesn't need
  104. BRUN45.EXE to run (a much smaller BRUN-dependent copy is available on
  105. request).  Source code is included; fix it if it's broken.  It is freely
  106. available, although copyrighted.  You are granted license to use it in a
  107. non-commercial environment at no charge forever and anon.  For
  108. commercial licensing, contact me at the number below with your credit
  109. card in hand :-)
  110.  
  111. I recommend that you create a temporary directory and do a little
  112. experimenting to be sure you have your FDEL command lines set up right
  113. before installing it into your system maintenance routines.  If you
  114. touch a key, FDEL will abort.  I provide ABSOLUTELY NO WARRANTY
  115. whatsoever for FDEL, and if it deletes your entire disk drive because
  116. you screw up, shame on you.  This statement takes away specific legal
  117. rights and you may have other rights taken away which may vary from
  118. state to state.  Nyah nyah.  (Yes, I'm the jerk that writes XBBS)
  119.  
  120.  
  121. I will support FDEL in the following manner only:
  122. ------------------------------------------------
  123. My wife and I made a deal.  I could get a second phone line and run a
  124. BBS, even tie into the Matrix, but I can _not_ make long distance calls.
  125. I could probably con my Host into it (he's a nice guy), but I'm not
  126. going to bother him asking for that kind of freebie.  So, if you want
  127. netmail support, you'll have to send me a message, wait a day or two,
  128. and poll me for the answer.  Since you're footing the bill, it'll be to
  129. your advantage to provide enough information for me to be able to help
  130. you.  Include everything you can think of, no matter how trivial, that
  131. might lead to a clue as to why you're having problems, or if you've
  132. found a bug, give me all the detail you can on what happens before and
  133. after it strikes.  I'll do everything I can to help you out, within the
  134. limits of the information you give me, up to and including putting a
  135. fixed version on hold for you.  An alternative to this manner would be
  136. the good old U.S. Snail.  Include an S.A.S.E.  I can be reached at the
  137. following address:
  138.  
  139.     M. Kimes
  140.     542 Merrick
  141.     Shreveport, LA  71104
  142.  
  143. In other words, I'm giving the program away free, but I'm not footing
  144. the bill for your questions.  Sorry, maybe someday she'll let me at
  145. least get a long distance carrier...  :-)
  146.  
  147.  
  148. M. Kimes
  149. 1:380/16.0@FidoNet
  150. (318)222-3455 data)
  151.