Classic Computer Magazine Archive COMPUTE! ISSUE 90 / NOVEMBER 1987 / PAGE 94

Atari Multiple File Deleter

Craig Stadler

Free up valuable disk space by quickly discarding old files with this ahandy disk utility. For all Atari eight-bit computers.


Once your disk library has grown to a dozen or more disks, discarding old files can become quite a chore. "Atari Multiple File Deleter" simplifies the housekeeping, allowing you to scratch files with the press of a key.

Getting Started

Type in and save a copy of Multiple File Deleter. To use the program, load it and type RUN.

First, choose the drive from which you would like to delete files. If you are using DOS 2.5 with the RAMDISK.COM file on a 130XE, you may choose drive 8—the ramdisk. Insert the correct disk into the selected drive, then press any key to continue. Each file on the disk is displayed, one at a time. Press D if you wish to delete the file. Press RETURN if you want to keep the file. Press X to escape and start over. To exit the program without deleting any files, press the BREAK key.

The files aren't deleted when you press D—in fact, no files are deleted until you have decided whether or not to delete every file on the disk. Before the files tagged for deletion are actually deleted, you are given one final chance to change your mind and start over.

For the safety of your files, this utility does not attempt to delete locked files. Files can be locked and unlocked from the DOS menu. If you wish to unlock all the files on a disk at once, enter *.* as the filename after choosing unlock.

Atari Multiple File Deleter

For instructions on entering this program, please refer to "COMPUTE!'s Guide to Typing In Programs" elsewhere in this issue.

AO	10	REM COPYRIGHT 1987 COMPUTE! PUBLICATIONS, INC. ALL RIGHTS RESERVED.
GG	20	? "{CLEAR}" : POSITION 13, 6 : PRINT "Copyright 1987" : POSITION 6, 7 : PRINT "COMPUTE! Publications, Inc."
KD	30	POSITION 10, 8 : PRINT "A11 Rights Reserved." : FOR I = 1 To 1500 : NEXT I
NB	100	CLR : POP : GRAPHICS 0 : GOSUB 1000
MF	110	? "{CLEAR} Atari Multiple file deleter " : ?
AG	120	TRAP 110 : ? "Use drive 1–8 : "; : INPUT DR : IF DR<1 OR DR>8 THEN 120
FL	130	DR $ (1, 1) = "D" : DR $ (2,2) = STR $ (INT(DR)): DR $ (3,6)=" : *.*"
OD	140	? "{UP}Insert disk and hit any key." :GET #A2, A
ML	150	CLOSE #A1 : OPEN #A1, A6 A0, DR $ : TRAP 110
JC	160	? :? "{UP}{6 SPACES} RETURN for next file {3 SPACES}" : ? " {TAB} D to delete file" : ? "{TAB} X to end selections"
DE	170	? "----------------------------" :? "{TAB} {7 SPACES) Drive # ";DR : ?
MP	180	FOR A = A0 TO 65 : TRAP 320 : INPUT #A1,A $ : IF A $ (14, 15) = "OR" THEN 320
GJ	190	? ; A + 1; "{TAB}" ; A $ (1, 1);
NC	200	A $ (1, 11) = A $ (3, 13) : FOR X = A1 TO 8: IF A $ (X, X) = CHR $ (32) THEN 220
HA	210	? A $ (X, X); : NEXT X
NK	220	? "."; A $ (9, 11); "{TAB}"; A $ (15,17); " : " ;
HK	230	GET #A2, C
GD	240	IF C = 155 OR C = 68 OR C = 88 THEN ? CHR $ (C)
AB	250	IF C = 155 THEN ? "{3 UP}" : NEXT A
DH	260	IF C = 88 THEN 10000
BK	270	IF C = 68 THEN GOSUB 290 : NEXT A
BI	280	GOTO 230
HJ	290	DIR $ (LEN(DIR $ ) + 1) = DR $ (1, 3) : DIR $ (LEN(DIR $ ) + 1) = A $ (1, X–1)
EB	300	DIR $ (LEN(DIR $ ) + 1) = CHR $ (46) : DIR $ (LEN(DIR $ ) + 1) = A $ (9, 11)
LL	310	DIR $ (LEN(DIR $ ) + 1) = CHR $ (155) : RETURN
NB	320	? : ? : ? "PRESS X TO EXIT" : ? "PRESS ANY KEY TO BEGIN" : GET #A2, CC
BI	330	IF CC = 88 THEN 100
EI	340	? : CLOSE #A1 : IF LEN(DIR $ ) <5 THEN 100
FA	350	FOR A = A1 TO LEN (DIR $ ) : XD = XD + 1
BJ	360	IF DIR $ (A, A) = CHR $ (155)THEN 420
EI	370	DR $ (XD, XD) = DIR $ (A, A)
OC	380	NEXT A : ? : ? "END OR RESTART PROGRAM?" ; : GET#A2, CC
KI	390	IF CC = 69 OR CC<>82 THEN ? "{CLEAR}" : END
EJ	400	IF CC = 82 THEN GOTO 100
MA	410	REM DELETE FILENAMES
FB	420	? "DELETING"; DR $ : TRAP 430 : X10 33,#A1, A0, A0, DR $ : XD = 0 : GOTO 380
KB	430	? "FILE–"; DR $ : ? "LOCKED/DISK ERROR" : ? "NEXT FILE…" : XD = 0 : GOTO 380
GM	1000	DIM A $ (17), DIR $ (600), DR $ (15)
OB	1010	A0 = 0 : A1 = 1 : A2 = 2 : A4 = 4 : A6 = 6 : A33 = 33 : XD = 0
AF	1030	CLOSE #A2 : OPEN #A2, A4, A0, "K : "
KF	1040	RETURN