Other than a small error (you omitted DIR$() ), it works fine.
file rewritten:
Code:
SHELL "COPY A:\DATA.BAK" ' Copy this file to C drive from A drive IF DIR$("DATA.INP") <> "" THEN KILL"DATA.INP" 'if file exists delete it NAME "DATA.BAK" AS "DATA.INP" ' rename backup file as main file ' Note that DATA.BAK has already been renamed, ' Now you have to test for the existance of the New Name! IF DIR$("DATA.INP") <> "" 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 '************
[email protected]
Leave a comment: