home *** CD-ROM | disk | FTP | other *** search
-
- FDEL -- a delete-by-days file utility copyright (c) 1989/90 by M. Kimes [XBBS]
- ==============================================================================
- Usage: FDEL Command Pattern [#Days] <-EExclude_File> <-LList_File> <-N>
- (Command=DELETE LIST or TOUCH) (? for a help screen)
-
-
- Updated docs for version 1.3
-
-
- FDEL is intended to make your upload/download areas self-maintaining.
- It will delete files by age according to their file date stamp. You
- can also list the files (instead of deleting them) to a text file, which
- you can then review and/or post for reading by your users so they know
- what is slated for deletion. A final twist is added with the Exclude
- file, a text file containing the fully qualified pathnames of files
- which should not be deleted even if they meet the date criterion.
-
- You can run FDEL with the command line arguments ? or H to get a help
- screen (i.e. "FDEL ?" or "FDEL H"). Its use is fairly simple, at least
- once you get the hang of it. Let's take a pratical example:
-
- Suppose you have a directory (C:\BT\NODELIST\) in which you keep Nodelists
- and Nodediffs available for download. You want to kill them off after 14
- days in the directory (this should always leave two nodediffs and two
- nodelists if you get them once per week). In its simplest form, the FDEL
- command line would be
-
- FDEL DELETE C:\BT\NODELIST\NODE*.* 14
-
- This would delete any files in C:\BT\NODELIST that matched the pattern
- NODE*.* if they were 14 or more days old. If you had other files
- besides nodediffs and nodelists in the directory that matched that
- pattern, you might run FDEL twice with more specific (NODELIST.* and
- NODEDIFF.*) patterns.
-
- Now lets get a little more complicated. Suppose you want to list the
- files without deleting them, just to check and see what would be deleted
- before you trust FDEL to do its auto-deletion. Use
-
- FDEL LIST C:\BT\NODELIST\NODE*.* 14 -LTODELETE.LST
-
- This will list all the files that would have been deleted in the file
- TODELETE.LST (in the default directory since we didn't specify a path).
- If you added the -N command line parameter, FDEL would automatically
- exclude the newest matching file, and refuse to run if only one matching
- file were available (good for protecting a nodelist in case the nodediff
- didn't make it when it should have).
-
- Another example -- Let's say that you have a private nodelist in the
- directory that you want to protect. This file is named NODELIST.PVT.
- Create a text file called NODELETE.LST and put this line in it:
-
- NODELIST.PVT
-
- If you now run FDEL with the command line
-
- FDEL DELETE C:\BT\NODELIST\NODE*.* 14 -ENODELETE.LST
-
- FDEL will delete any matching file older than 14 days EXCEPT
- NODELIST.PVT. Since it's listed in the Exclude file NODELETE.LST (and
- we told FDEL to look at it with the -E<filename> argument), it's
- excepted from auto-deletion. Exclude files can contain multiple
- filenames, one per line.
-
- Exclude and List files are limited to 5040 entries each.
-
- One final command is available to FDEL. You can "Touch" a file's date
- stamp so that it is set to the current date. The #Days parameter is not
- needed in this case. Back to protecting NODELIST.PVT in a different
- manner, you could run FDEL with this command line BEFORE your delete
- run:
-
- FDEL TOUCH C:\BT\NODELIST\NODELIST.PVT
-
- You can have FDEL list the files while it deletes or touches them with
- something like
-
- FDEL DELETE C:\BT\NODELIST\NODE*.* 14 -LDELETED.LST
-
- FDEL WILL DELETE the files, but it also lists them in DELETED.LST, since
- we passed the -L<filename> argument. Keep in mind that you can direct a
- List or Exclude file to a certain directory by including path
- information (i.e. -LC:\LISTS\DELETED.LST). Also remember that List
- files will be appended to if they are existing, rather than overwritten.
- And, although we have always used the words DELETE, LIST or TOUCH in the
- Command position (right after the FDEL filename), you can use just the
- first letter (L instead of LIST, D instead of DELETE, T instead of
- TOUCH).
-
- FDEL 1.3 has a new option, CUT. CUT will trim a directory down to the
- newest X number of files (where X is the number you pass in the #Days
- slot--for CUT, it's the number of files to leave). CUT kills the oldest
- files and leaves the newest, which works out nice if you touch file
- datestamps when they're uploaded (or before moving them to their final
- resting place). If you pass the -L option for listing files, CUT lists
- instead of CUTting, so you can test to see if you've got it set the way
- you want it set. Even -LNUL will give you a list on the screen for a
- quick check. This makes it relatively simple to set up self-maintaining
- file areas. NOTE that CUT doesn't delete if it's Listing, but DELETE
- DOES!
-
- FDEL is written in QuickBASIC 4.5 compiled so that it doesn't need
- BRUN45.EXE to run (a much smaller BRUN-dependent copy is available on
- request). Source code is included; fix it if it's broken. It is freely
- available, although copyrighted. You are granted license to use it in a
- non-commercial environment at no charge forever and anon. For
- commercial licensing, contact me at the number below with your credit
- card in hand :-)
-
- I recommend that you create a temporary directory and do a little
- experimenting to be sure you have your FDEL command lines set up right
- before installing it into your system maintenance routines. If you
- touch a key, FDEL will abort. I provide ABSOLUTELY NO WARRANTY
- whatsoever for FDEL, and if it deletes your entire disk drive because
- you screw up, shame on you. This statement takes away specific legal
- rights and you may have other rights taken away which may vary from
- state to state. Nyah nyah. (Yes, I'm the jerk that writes XBBS)
-
-
- I will support FDEL in the following manner only:
- ------------------------------------------------
- My wife and I made a deal. I could get a second phone line and run a
- BBS, even tie into the Matrix, but I can _not_ make long distance calls.
- I could probably con my Host into it (he's a nice guy), but I'm not
- going to bother him asking for that kind of freebie. So, if you want
- netmail support, you'll have to send me a message, wait a day or two,
- and poll me for the answer. Since you're footing the bill, it'll be to
- your advantage to provide enough information for me to be able to help
- you. Include everything you can think of, no matter how trivial, that
- might lead to a clue as to why you're having problems, or if you've
- found a bug, give me all the detail you can on what happens before and
- after it strikes. I'll do everything I can to help you out, within the
- limits of the information you give me, up to and including putting a
- fixed version on hold for you. An alternative to this manner would be
- the good old U.S. Snail. Include an S.A.S.E. I can be reached at the
- following address:
-
- M. Kimes
- 542 Merrick
- Shreveport, LA 71104
-
- In other words, I'm giving the program away free, but I'm not footing
- the bill for your questions. Sorry, maybe someday she'll let me at
- least get a long distance carrier... :-)
-
-
- M. Kimes
- 1:380/16.0@FidoNet
- (318)222-3455 data)
-