PACK Command

See Also

Permanently removes all records marked for deletion in the current table and reduces the size of a memo file associated with the table.

Syntax

PACK [MEMO] [DBF]

Arguments

MEMO

Removes unused space from the memo file but doesn't remove records marked for deletion from the table. Information in memo fields is stored in an associated memo file. A memo file has the same name as the table and an .fpt extension.

DBF

Removes records marked for deletion from the table but doesn't affect the memo file.

Remarks

When you use PACK, Microsoft Visual FoxPro copies all records not marked for deletion to a temporary table. After PACK is finished executing, Visual FoxPro deletes the original table from disk and renames the temporary table with the original table name. If you press ESC to interrupt PACK, the temporary table is deleted, and the original table remains unchanged. The original table is also recovered if you run out of disk space while PACK is executing.

When you issue PACK without the MEMO and DBF clauses, PACK affects both the table and the memo file.

PACK requires exclusive use of the table. For more information about opening a table exclusively on a network, see SET EXCLUSIVE.

If the current table has one or more indexes open, PACK rebuilds the index files.

Caution   Be careful to mark only records that you no longer need. There is no way to retrieve deleted records after using PACK.