set color to W+/W
@ 0 , 0
set color to W+/R
@ 24 , 0
set color to W+/B,W+/R
@ 1 , 0 clear to 23 , 79
if jfhh1<10
jfhs="0"+str(jfhh1,1)
else
jfhs=str(jfhh1,2)
endif
FIL_NUM = 35
dimension DBF_NAME(FIL_NUM)
DBF_NAME = ""
DBF_NAME(1) = "dmx2.dbf"
DBF_NAME(2) = "dmx3.dbf"
DBF_NAME(3) = "dmx4.dbf"
DBF_NAME(4) = "dmx5.dbf"
DBF_NAME(5) = "dzl1.dbf"
DBF_NAME(6) = "dzl2.dbf"
DBF_NAME(7) = "dzl3.dbf"
DBF_NAME(8) = "dzl4.dbf"
DBF_NAME(9) = "dzl5.dbf"
DBF_NAME(10) = "dzz.dbf"
DBF_NAME(11) = "dzzrj.dbf"
DBF_NAME(12) = "dsyrj.dbf"
DBF_NAME(13) = "drjd.dbf"
DBF_NAME(14) = "dsyzz.dbf"
DBF_NAME(15) = "dzzrjhb.dbf"
DBF_NAME(16) = "dzzrjdhb.dbf"
DBF_NAME(17) = "dzztotal.dbf"
DBF_NAME(18) = "dejzz.dbf"
DBF_NAME(19) = "dejzzrj.dbf"
DBF_NAME(20) = "dsyejrj.dbf"
DBF_NAME(21) = "dejrjd.dbf"
DBF_NAME(22) = "dsyejzz.dbf"
DBF_NAME(23) = "dejrjdhb.dbf"
DBF_NAME(24) = "dejtotal.dbf"
DBF_NAME(25) = "dgs.dbf"
DBF_NAME(26) = "dkhdj.dbf"
DBF_NAME(27) = "dkjjl.dbf"
DBF_NAME(28) = "dyh.dbf"
DBF_NAME(29) = "ddszy.dbf"
DBF_NAME(30) = "dhjcs.dbf"
DBF_NAME(31) = "dlsz.dbf"
DBF_NAME(32) = "ddtxx.dbf"
DBF_NAME(33) = "dejlsz.dbf"
DBF_NAME(34) = "dzzcw.dbf"
DBF_NAME(35) = "dmx1.dbf"
set color to N/N
@ 5 , 27 clear to 11 , 55
set color to N+/GB+
DRV_NO = 1
@ 4 , 25 say " 数 据 备 份 "
@ 5 , 25 say " ┏━━━━━━━━━━━━┓"
@ 6 , 25 say " ┃ 选择驱动器: ┃"
@ 7 , 25 say " ┃────────────┃"
@ 8 , 25 say " ┃→←↑↓选择, Enter确认 ┃"
@ 9 , 25 say " ┃ ESC 退出 ┃"
@ 10, 25 say " ┗━━━━━━━━━━━━┛"
do while .t.
set color to N+/GB+
@ 6 , 43 prompt "A:"
@ 6 , 48 prompt "B:"
menu to DRV_NO
if DRV_NO=0
?? chr(7)
do
redisp with 3
return
endif
if DRV_NO=1
BACK_DRV = "A:"
else
BACK_DRV = "B:"
endif
DRV_SELE = "Y"
set color to W+/R
@ 13 , 24 say " 将数据备份到【"+BACK_DRV+"】盘吗(Y/N)? " get DRV_SELE
read
set color to W+/B
@ 13 , 0
if upper(DRV_SELE)="Y"
exit
else
?? chr(7)
loop
endif
enddo
set color to W+/R
@ 13 , 15 say " 请将格式好的空白软盘或上次备份盘插入【"+BACK_DRV+"】驱动器 "
@ 14 , 15 say " "
@ 15 , 15 say " 准备好后按任意键开始备份...... "
wait ""
set color to W+//B
@ 13 , 0
@ 14 , 0
@ 15 , 0
FILE_NO = 1
do while FILE_NO<=FIL_NUM
set color to W+/R
SET DEFA TO &BACK_DRV
FD_VOL = diskspace()
set default to
DBF_USE = DBF_NAME(FILE_NO)
USE &DBF_USE
FIE_NUM = fcount()
REC_NUM = reccount()
REC_LEN = recsize()
FL_LEN = REC_NUM*REC_LEN+32*FIE_NUM+34
if FL_LEN>FD_VOL
?? chr(7)
@ 18 , 18 say " 磁盘空间不够, 换盘后按任意键重新开始...... "
wait ""
set color to W+/B
@ 18 , 0
loop
endif
if FILE_NO=1
@ 16 , 19 say " 正在进行备份, 请稍候 "
endif
@ 16 , 40+int(FILE_NO/FIL_NUM*15) say "."
@ 16 , 56 say str(int(FILE_NO/FIL_NUM*100),3)+"%"
SOUR_FIL = jfpath+"/"+DBF_NAME(FILE_NO)
TARG_FIL1 = BACK_DRV+DBF_NAME(FILE_NO)
TARG_FIL2 =RTRIM(TARG_FIL1)
TARG_FIL3 =LTRIM(TARG_FIL2)
TARG_LEN1 =LEN(TARG_FIL3)
TARG_LEN =TARG_LEN1-1
TARG_FIL =STUFF(TARG_FIL3,TARG_LEN,2,JFHS)
@ 24 , 0 say ""
use
COPY FILE &SOUR_FIL TO &TARG_FIL
FILE_NO = FILE_NO+1
enddo
?? chr(7)
@ 18 , 19 say " 备份结束, 按任意键返回...... "
wait ""
set color to W+/B
do redisp with 3
return
color to W+/B
do redisp with 3
return