General information
Category:
Forms & Form designer
Thanks for you help ... here is what seems to work well without run or shell outside the exe .... all on the click event of a cmdGo button.
CLOSE DATABASES All
"Backup"
Prompt for target folder in text box txtBackupRestore.value
MKDIR ALLTRIM(thisform.txtBackupRestore.value)
*check to see of mkdir was successful
IF directory(ALLTRIM(thisform.txtBackupRestore.value))
COPY FILE *.dbc to ALLTRIM(thisform.txtBackupRestore.value)
same for .dct, .dcx, .dbf, .cdx, .fpt, .hlp
ELSE
MESSAGEBOX("Folder not created"+CHR(13)+ ;
"nothing copied",0,"Folder Check")
return
ENDIF
"RESTORE"
IF !DIRECTORY(ALLTRIM(thisform.txtBackupRestore.value))
MESSAGEBOX("Folder not found,"+CHR(13)+ ;
"nothing restored",0,"Folder Check")
RETURN
ENDIF
SET SAFETY off
COPY FILE ALLTRIM(thisform.txtBackupRestore.value)+"\*.dbc" TO *.*
same for .dct, .dcx, .dbf, .cdx, .fpt, .hlp
SET SAFETY on
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only