主题:一个较难的问题-关于数据备份表单执行时出错的问题
CLOSE ALL
path_1=ADDBS(ALLTRIM(thisform.text1.Value))
path_2=ADDBS(ALLTRIM(thisform.text2.Value))
IF EMPTY(path_1) OR EMPTY(path_2)
MESSAGEBOX("备份数据库名和路径不能为空!",16,"电子检索系统")
ELSE
IF DIRECTORY(path_2)=.f.
MD "&path_2"
ENDIF
IF RIGHT(path_1,1) <> "\"
dirpath=path_1+"\*.*"
Ypath=path_1+"\"
ELSE
dirpath=path_1+"*.*"
Ypath=path_1
ENDIF
ADIR(filecursor,dirpath)
cout=ALEN(filecursor,1)
thisform.olecontrol1.Visible=.t.
thisform.olecontrol1.max=cout
FOR m=1 TO cout
thispathname=Ypath+ALLTRIM(filecursor(m,1))
bakpathname=path_2+ALLTRIM(filecursor(m,1))
if JUSTEXT(thispathname) = [b][color=800000]'Plantsearcher.exe' [/color][/b]or JUSTFNAME(thispathname) = [color=800080]'foxuser.dbf' [/color];or JUSTFNAME(thispathname) = [b]'foxuser.fpt' [/b]
else
COPY FILE "&thispathname" TO "&bakpathname"
thisform.olecontrol1.value=m
thisform.Refresh
endif
ENDFOR
thisform.olecontrol1.Visible=.f.
MESSAGEBOX("数据备份成功!",48,"图文检索系统")
ENDIF
thisform.refresh
现在关键的问题是我不知道怎样忽略掉.exe和foxuser.dbf和foxuser.fxp在每次执行程序后总会产生那两个令人讨厌的文件。。。。。。。
path_1=ADDBS(ALLTRIM(thisform.text1.Value))
path_2=ADDBS(ALLTRIM(thisform.text2.Value))
IF EMPTY(path_1) OR EMPTY(path_2)
MESSAGEBOX("备份数据库名和路径不能为空!",16,"电子检索系统")
ELSE
IF DIRECTORY(path_2)=.f.
MD "&path_2"
ENDIF
IF RIGHT(path_1,1) <> "\"
dirpath=path_1+"\*.*"
Ypath=path_1+"\"
ELSE
dirpath=path_1+"*.*"
Ypath=path_1
ENDIF
ADIR(filecursor,dirpath)
cout=ALEN(filecursor,1)
thisform.olecontrol1.Visible=.t.
thisform.olecontrol1.max=cout
FOR m=1 TO cout
thispathname=Ypath+ALLTRIM(filecursor(m,1))
bakpathname=path_2+ALLTRIM(filecursor(m,1))
if JUSTEXT(thispathname) = [b][color=800000]'Plantsearcher.exe' [/color][/b]or JUSTFNAME(thispathname) = [color=800080]'foxuser.dbf' [/color];or JUSTFNAME(thispathname) = [b]'foxuser.fpt' [/b]
else
COPY FILE "&thispathname" TO "&bakpathname"
thisform.olecontrol1.value=m
thisform.Refresh
endif
ENDFOR
thisform.olecontrol1.Visible=.f.
MESSAGEBOX("数据备份成功!",48,"图文检索系统")
ENDIF
thisform.refresh
现在关键的问题是我不知道怎样忽略掉.exe和foxuser.dbf和foxuser.fxp在每次执行程序后总会产生那两个令人讨厌的文件。。。。。。。