(VFP) - How to Pack data automaticaly

This code show u how to do it

******************
PARAMETERS myDataDir
SET EXCLUSIVE ON
LOCAL aFiles, nCount, I
DIMENSION aFiles(1,1)
nCount = ADIR(aFiles,mydataDir+"\"+"*.DBF")
=ASORT(aFiles,1)
I=1
FOR I = 1 TO nCount
WAIT WINDOW "Reindexing "+aFiles(I,1)+ ;
" ... Please wait" NOWAIT
SELECT 0
USE mydataDir+"\"+(aFiles(I,1))
PACK
USE
WAIT CLEAR
ENDFOR
SET EXCLUSIVE OFF
RETURN

Comments

Popular posts from this blog

(VFP) - Running Visual FoxPro on Linux

(VFP) - How To Run Exe File and include them to your Project

(VFP) - How to put calendar on your vfp application