>Hi Fred, Thank you. Maybe i could be wrong.
>Hi John. I believe a PACK makes a copy of the original table but without >the records marked for deletion. Then deletes the original table and >renames the new table to the original name. If so, then a file undelete >program could theoretically recover the deleted file providing the disk >space has not been used for other purposes in the meantime.
Jos, AT Least, somebody with open mind, yes theoretically if no process have writed the sector of packed file it can be restored. I found the next code on my old downloads, its called unzap, it supposed to recover all zapped records, i was testing it but something is wrong.
I put this code here, i don't know who is the owner but, i'm sure it was totally free when i found it.
Take a look Jos:
*Hay veces que incluso despues de un ZAP, ;
se puede recuperar los registros, solo
*funciona si no se han escrito datos ;
encima de esos registros.
*Ussage:
*ZAP
*=UNZAP(47) && restore 47 records
PARAMETER Y
SET STEP ON
IF Y>0 .AND. USED()
IF RECCOUNT()=0
FILENAME=DBF()
USE
HANDLE=FOPEN(FILENAME,2)
IF HANDLE>0
BYTE=FREAD(HANDLE,32)
BKUP_BYTE=BYTE
FIELD_SIZE=ASC(SUBSTR(BYTE,11,1))+(ASC(SUBSTR(BYTE,12,1))*256)
FILE_SIZE=FSEEK(HANDLE,0,2)
BYTE8=CHR(INT(Y/(256*256*256)))
BYTE7=CHR(INT(Y/(256*256)))
BYTE6=CHR(INT(Y/256))
BYTE5=CHR(MOD(Y,256))
BYTE=SUBSTR(BYTE,1,4)+BYTE5+BYTE6+BYTE7+BYTE8+SUBSTR(BYTE,9)
=FSEEK(HANDLE,0)
=FWRITE(HANDLE,BYTE)
=FCHSIZE(HANDLE,FILE_SIZE+(FIELD_SIZE*Y))
=FCLOSE(HANDLE)
ENDIF
USE &FILENAME
ENDIF
ENDIF