10 'SCLEAN.BAS: Creates SCLEAN.COM, a utility that searches an entire hard 11 'disk for specific filenames (or wildcards) to erase or retain files 12 'selectively. The syntax is: SCLEAN [d:] filename. SCLEAN begins its 13 'search in the root directory and then scans any subdirectories that 14 'exist. When a filename is found that matches the one you specify, 15 'SCLEAN prints out the filename and its path and waits for you to enter 16 'a Y or an N. Choosing a Y will automatically delete the match, while 17 'choosing an N will leave it alone. If any other key is pressed, the 18 'question will be repeated. With simple changes, you can adapt this 19 'utility so it erases without showing the matches one by one and without 20 'waiting to confirm each deletion, as though you typed in a true global 21 'erase command. You can create this second version by making these 22 'changes: Substitute a new name (such as GCLEAN.COM) in lines 230 and 23 '270, change the Z#=34390! in line 150 to Z#=34205!, and changes lines 24 '280 and 370 to: 25 ' 280 DATA EB,1F,90,44,65,6C,65,74,65,20,00,0D,0A,00,2F,4E,1185 26 ' 370 DATA 01,E8,95,00,B4,01,EB,17,90,90,BE,15,01,E8,89,00,1690 27 'The SCLEAN.COM version is a lot safer than GCLEAN.COM, since GCLEAN *.* 28 'could wipe out your entire hard disk (including the GCLEAN.COM file that 29 'did the damage) except for the subdirectory names themselves. If you do 30 'use GCLEAN, unless you're extremely careful, create batch files that do 31 'the actual work and prevent errant keystrokes from wreaking havoc. For 32 'instance, a batch file called BAK.BAT to delete .BAK files everywhere on 33 'a hard disk would contain the line: GCLEAN *.BAK. From PC Magazine 34 'Vol 5 No 3 Feb 11, 1986 User-to-User. NOTE: THIS IS THE SCLEAN.BAS FILE 35 'MODIFIED TO CREATE GCLEAN.COM!!!!!!! 100 ' 110 PRINT"Checking data statements ..." 120 FOR B=1 TO 20:FOR C=1 TO 17:READ A$:IF C<17 THEN 140 130 Z#=Z#+VAL(A$) 140 NEXT:NEXT 150 IF Z#=34205! THEN RESTORE:GOTO 170 160 PRINT"Checksum error. Redo.":END 170 FOR B=1 TO 20:FOR C=1 TO 16:READ A$:TTL=TTL+VAL("&H"+A$) 180 NEXT 190 READ S:IF S=TTL THEN 220 200 PRINT"Data error in line";B*10+270 210 PRINT"Check figures and redo.":END 220 TTL=0:NEXT:RESTORE 230 OPEN "GCLEAN.COM" AS #1 LEN=1:FIELD #1,1 AS D$ 240 FOR B=1 TO 20:FOR C=1 TO 16 250 READ A$:LSET D$=CHR$(VAL("&H"+A$)) 260 PUT #1:NEXT:READ DUMMY$:NEXT:CLOSE 270 PRINT "GCLEAN.COM created." 280 DATA EB,1F,90,44,65,6C,65,74,65,20,00,0d,0a,00,2F,4E,1185 290 DATA 29,3A,20,20,00,0A,0D,00,2A,2E,2A,00,00,00,00,3A,374 300 DATA 00,BF,80,00,8B,1D,32,FF,C6,41,01,00,FC,47,8B,CB,1721 310 DATA B0,20,F3,AE,E3,25,80,3D,3A,75,07,8A,45,FF,47,EB,2028 320 DATA 08,90,B4,19,CD,21,4F,04,41,A2,1E,01,89,3E,1C,01,1164 330 DATA BA,1E,01,52,80,C2,02,52,E8,02,00,CD,20,55,8B,EC,1636 340 DATA 83,EC,73,8B,D5,83,EA,71,B4,1A,CD,21,8B,1E,1C,01,1954 350 DATA E8,8B,00,33,C9,B4,4E,CD,21,72,43,BE,03,01,E8,A8,1894 360 DATA 00,8B,DD,83,EB,53,E8,75,00,8B,F2,E8,9B,00,BE,0B,2127 370 DATA 01,E8,95,00,B4,01,eb,17,90,90,BE,15,01,E8,89,00,1690 380 DATA 80,E3,DF,80,FB,59,74,07,80,FB,4E,74,0B,EB,CC,8B,2331 390 DATA D5,83,EA,40,B4,41,CD,21,B4,4F,CD,21,73,BD,BB,18,2137 400 DATA 01,E8,3A,00,B9,10,00,B4,4E,CD,21,72,2B,80,7E,AD,1572 410 DATA 2E,74,1F,80,7E,A4,10,75,19,BB,1B,01,E8,1F,00,52,1329 420 DATA 8B,D5,83,EA,53,52,E8,74,FF,8B,D5,83,EA,71,B4,1A,2521 430 DATA CD,21,B4,4F,CD,21,73,D5,8B,E5,5D,C2,04,00,8B,FD,2114 440 DATA 83,EF,40,8B,D7,8B,76,06,E8,15,00,C6,05,5C,8B,76,1856 450 DATA 04,E8,0C,00,C6,05,5C,47,8B,F3,E8,03,00,88,05,C3,1567 460 DATA AC,0A,C0,74,03,AA,EB,F8,C3,B4,02,8A,14,0A,D2,74,2017 470 DATA 05,CD,21,46,EB,F5,C3,00,00,00,00,00,00,00,00,00,988