home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 28 / amigaformatcd28.iso / -readerstuff- / richard_burke / scripts / happysearch < prev    next >
Encoding:
Text File  |  1998-05-02  |  2.3 KB  |  112 lines

  1. resident >nil: c:search PURE
  2. resident >nil: c:requestfile PURE
  3. resident >nil: c:requestchoice PURE
  4. resident >nil: c:echo PURE
  5. resident >nil: c:copy PURE
  6. resident >nil: c:type PURE
  7.  
  8. ; $VER: HappySearch v1.0 (25.4.97) Richard Burke
  9.  
  10. requestchoice >env:int "HappySearch" "HappySearch searches the specified device/drawer*nto see if any files have been infected with the*n'Happy New Year 96!' virus, and informs of any*ninfected files it finds. Such files will have the*nvirus name printed below them in the scanned file*nlisting." "Okay" "Quit"
  11. if $int EQ 0
  12.         quit
  13. endif
  14.  
  15. lab beg
  16. if exists env:mo
  17.         delete >nil: env:mo
  18. endif
  19.  
  20. if exists env:disp
  21.         delete >nil: env:disp
  22. endif
  23.  
  24. if exists env:dev
  25.         delete >nil: env:dev
  26. endif
  27.  
  28. if exists env:hap
  29.         delete >nil: env:hap
  30. endif
  31.  
  32. if exists env:sav1
  33.         delete >nil: env:sav1
  34. endif
  35.  
  36. if exists env:rec
  37.         delete >nil: env:rec
  38. endif
  39.  
  40. if exists env:sav
  41.         delete >nil: env:sav
  42. endif
  43.  
  44. if exists env:int
  45.         delete >nil: env:int
  46. endif
  47.  
  48. requestfile >env:dev TITLE "Choose drawer to search:" POSITIVE Search DRAWERSONLY
  49. if warn
  50.         quit
  51. endif
  52.  
  53. requestchoice >env:disp "Save?" "Results will be printed to screen.*nSave results to file too?*n(This is recommended)" "Yes" "No"
  54. if $disp EQ 1
  55.         requestfile >env:sav TITLE "Location:" POSITIVE Save DRAWER RAM: FILE Happy.tmp
  56.         echo $sav >env:sav1
  57. endif
  58.  
  59. requestchoice >env:rec "Recurse?" "Search sub-directories recursively?" "Yes" "No"
  60. if $rec EQ 1
  61.         echo "Scanning files . . ."
  62.         search $dev "Happy New Year 96!" ALL >env:hap
  63. else
  64.         echo "Scanning files . . ."
  65.         search $dev "Happy New Year 96!" >env:hap
  66. endif
  67. echo "Files scanned:"
  68. type env:hap
  69. if $disp EQ 0
  70.         delete >nil: env:hap
  71. else
  72.         copy >nil: env:hap $sav1
  73.         echo "File listing saved as *e[33m$sav1*e[0m"
  74. endif
  75.  
  76. requestchoice >env:mo "More?" "Scan another drawer?" "Yes" "No"
  77. if $mo EQ 1
  78.         skip beg back
  79. endif
  80. if exists env:mo
  81.         delete >nil: env:mo
  82. endif
  83.  
  84. if exists env:disp
  85.         delete >nil: env:disp
  86. endif
  87.  
  88. if exists env:dev
  89.         delete >nil: env:dev
  90. endif
  91.  
  92. if exists env:hap
  93.         delete >nil: env:hap
  94. endif
  95.  
  96. if exists env:sav1
  97.         delete >nil: env:sav1
  98. endif
  99.  
  100. if exists env:rec
  101.         delete >nil: env:rec
  102. endif
  103.  
  104. if exists env:sav
  105.         delete >nil: env:sav
  106. endif
  107.  
  108. if exists env:int
  109.         delete >nil: env:int
  110. endif
  111.  
  112. quit