**********************************************
** Purpose ... Pack ALL Tables in a directory
** Author .... Subramanian.G
** HowRun..... DO myPack WITH "myDataDir"
** .....OR.... = myPack("myDataDir")
*********************************************
** Save this code as "myPack.PRG"
**
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
*********************************************
** EOF
*********************************************
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.