home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. CD ROM (Annual Premium Edition)
/
premium.zip
/
premium
/
IBMOS2_2
/
PMCARDSR.ZIP
/
mv.bas
< prev
next >
Wrap
BASIC Source File
|
1989-09-22
|
677b
|
14 lines
1 'MV.BAS W.E.Davis 19890809
10 ON ERROR GOTO 60000
20 PRINT : INPUT "Old filename"; F1$: IF F1$ = "" THEN END
30 INPUT "New filename"; F2$: IF F2$ = "" THEN END
40 IF INSTR(F1$+F2$,"*") THEN BEEP: PRINT "Cannot contain *": GOTO 20
50 IF INSTR(F1$+F2$,"?") THEN BEEP: PRINT "Cannot contain ?": GOTO 20
60 IF INSTR(F1$+F2$,":") THEN BEEP: PRINT "Cannot contain :": GOTO 20
65 IF RIGHT$(F2$,1)="\" THEN F2$=F2$+F1$
70 NAME F1$ AS F2$: PRINT F1$; " moved to "; F2$
80 GOTO 20
60000 IF ERR = 53 THEN BEEP: PRINT F1$; " does not exist": RESUME 20
60010 IF ERR = 58 THEN BEEP: PRINT "Cannot create "; F2$: RESUME 20
60020 ON ERROR GOTO 0