Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Backup and Restore
Message
 
To
21/06/2006 02:57:23
Al Abaya
Metro South Medical Center
Bacoor, Philippines
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01129445
Message ID:
01132242
Views:
14
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
Map
View

Click here to load this message in the networking platform