home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / COMPRESS / FWKCS109.ZIP / FWKC17D.BAS < prev    next >
Encoding:
BASIC Source File  |  1989-03-14  |  1.8 KB  |  46 lines

  1. 10 ON ERROR GOTO 440
  2. 20 CLS:LOCATE 1,38:PRINT "Copyright (C) 1989 by Frederick W. Kantor."
  3. 30 LOCATE 2,60:PRINT "All rights reserved."
  4. 40 LOCATE 1,1:PRINT "FWKC17D(tm) Deletion Program"
  5. 50 LOCATE 2,1:PRINT "Version 1.00"
  6. 60 LOCATE 4,1:PRINT "Your use of this program is at solely your own risk:"
  7. 70 PRINT "Please have proper backup(s): THIS IS A DELETION PROGRAM."
  8. 80 LOCATE 8,27:PRINT "C A V E A T   O P E R A T O R"
  9. 90 LOCATE 17,9:PRINT "input file: MULTIS  (annotated with 'd'(s) in column 17 (decimal))"
  10. 100 LOCATE 11,1:PRINT "This is a special-purpose program; it's in interpretive 'basic' and/or the"
  11. 110 PRINT "like, and (mostly) spread out for relatively easy reading and modification."
  12. 120 PRINT "It's its own DOCs. It reads a special annotated file MULTIS, looking for a"
  13. 130 PRINT "lower_case 'd' in column 17 (decimal) of each line with a file for deletion,"
  14. 140 PRINT "deletes specifically that file, and logs each (sans 'd') in DELETED.LOG."
  15. 150 LOCATE 19,1
  16. 160 OPEN "multis" FOR INPUT AS 1
  17. 170 OPEN "deleted.log" FOR APPEND AS 2
  18. 180 WHILE NOT EOF(1)
  19. 190 LINE INPUT #1,A$
  20. 200 IF MID$(A$,17,1)<>"d" THEN GOTO 340
  21. 210 MID$(A$,17,1)=" "
  22. 220 P$=MID$(A$,44)
  23. 230 GOSUB 410
  24. 240 S1$=P$
  25. 250 P$=MID$(A$,18,12)
  26. 260 GOSUB 410
  27. 270 S$=S1$+"\"+P$
  28. 280 IF S$=" " OR S$="  " THEN GOTO 340
  29. 290 OPEN S$ AS 3 LEN=1:CLOSE 3:KILL S$
  30. 300 PRINT #2,A$
  31. 310 PRINT A$ STRING$(79-LEN(A$)," ")
  32. 320 PRINT S$ STRING$(79-LEN(S$)," ")
  33. 330 LOCATE 19,1
  34. 340 WEND
  35. 350 PRINT STRING$(79," ")
  36. 360 PRINT STRING$(79," ")
  37. 370 LOCATE 19,1
  38. 380 PRINT "done"
  39. 390 CLOSE
  40. 400 SYSTEM
  41. 410 IF RIGHT$(P$,1)=" " AND LEN(P$)>1 THEN P$=LEFT$(P$,LEN(P$)-1):GOTO 410
  42. 420 IF LEFT$(P$,1)=" " AND LEN(P$)>1 THEN P$=MID$(P$,2):GOTO 420
  43. 430 RETURN
  44. 440 IF ERL= 160 AND ERR=53 THEN LOCATE 17,1:PRINT ">-->>":LOCATE 19,1:PRINT "i need that file...  i quit.":RESUME 390
  45. 450 RESUME 390
  46.