home *** CD-ROM | disk | FTP | other *** search
- 10 'UNDOBACK.BAS UNDO FILES FROM HARD DISK BACKUP COMMAND
- 20 KEY OFF:CLS:COLOR 0,7
- 30 LOCATE 5,33:PRINT " UNDOBACK.BAS "
- 40 LOCATE 7,31:PRINT " By Rich Schinnell ":COLOR 7,0:PRINT:PRINT
- 50 PRINT "A program for IBM DOS 2.0/2.1
- 60 PRINT "Fixed Disk owners, ie XT's and expansion chassis's"
- 70 PRINT "who use the IBM BACKUP utility on the DOS diskette
- 80 PRINT "and want to access files from their backup disks without
- 90 PRINT "doing a recover. The only exception: is a file which was saved part
- 100 PRINT "on one disk and part on another.. Sorry about that case ........
- 110 PRINT "Maybe some sharper programmer can modify this program to check that"
- 120 PRINT "Press <ENTER> to quit enter ? for dir (eg..?B:*.* )"
- 130 DEFINT A-Z:FALSE=0:TRUE=NOT FALSE:ON ERROR GOTO 330
- 140 PRINT:PRINT:INPUT "What is input file name ";INFILE$
- 150 IF LEN(INFILE$)<1 THEN 320
- 160 IF LEFT$(INFILE$,1)="?" THEN FILES MID$(INFILE$,2):GOTO 140
- 170 OPEN INFILE$ FOR INPUT AS #1:CLOSE 1
- 180 INPUT "What is output file name ";OUTFILE$
- 190 OPEN OUTFILE$ FOR INPUT AS #2:CLOSE 2
- 200 PRINT "File ";OUTFILE$;" already exists, try another name please":GOTO 180
- 210 OPEN INFILE$ AS #1 LEN=1
- 220 FIELD #1,1 AS A$
- 230 OPEN OUTFILE$ AS #2 LEN=1
- 240 FIELD #2,1 AS B$
- 250 A=LOF(1):PRINT "Input file has";A;" Bytes in it"
- 260 FOR I=1 TO 128:GET #1:NEXT I
- 270 FOR I=129 TO A
- 280 GET #1,I:LSET B$=A$
- 290 PUT #2:IF (I MOD 50)=0 THEN PRINT CHR$(15);
- 300 NEXT I
- 310 CLOSE:PRINT:PRINT "File ";OUTFILE$;" Successfully created "
- 320 KEY ON:END
- 330 IF ERL=170 THEN PRINT "file not found try again ":RESUME 140
- 340 IF ERL=190 THEN RESUME 210
- 350 PRINT "Error";ERR;" has occured in line #";ERL:RESUME 320
- occured in line #";ERL:RESUME 320
-