I'm trying to do this:
ON ERROR GOTO ERRORHANDLER
SHELL "COPY A:\DATA.BAK" ' Copy this file to C drive from A drive
ON ERROR GOTO 0
IF "DATA.INP" <> "" THEN KILL"DATA.INP" 'if file exists delete it
NAME "DATA.BAK" AS "DATA.INP" ' rename backup file as main file
END IF
IF "DATA.BAK" <> "" THEN 'prove the file was restored
PRINT" THE DATA HAS BEEN RESTORED TO THE HARD DRIVE"
ELSE
PRINT "THE DATA WAS NOT TRANSFERRED FROM THE FLOPPY DRIVE"
END IF
************
The computer will not recognize the data.bak file on the floppy
disk (I know the file is there). So, what is wrong with this code?
Please help.
Thanks. Keith
ON ERROR GOTO ERRORHANDLER
SHELL "COPY A:\DATA.BAK" ' Copy this file to C drive from A drive
ON ERROR GOTO 0
IF "DATA.INP" <> "" THEN KILL"DATA.INP" 'if file exists delete it
NAME "DATA.BAK" AS "DATA.INP" ' rename backup file as main file
END IF
IF "DATA.BAK" <> "" THEN 'prove the file was restored
PRINT" THE DATA HAS BEEN RESTORED TO THE HARD DRIVE"
ELSE
PRINT "THE DATA WAS NOT TRANSFERRED FROM THE FLOPPY DRIVE"
END IF
************
The computer will not recognize the data.bak file on the floppy
disk (I know the file is there). So, what is wrong with this code?
Please help.
Thanks. Keith
Comment