How to Modify DBF File Structure

Modifying DBF structure means one of the following:

  • Adding new fields to the dbf database
  • Deleting existing fields
  • Changing order of fields
  • Renaming fields
  • Changing the type or size of fields

All of these operations can be done in the program. Here is how.

How to Modify DBF Structure in DBF Viewer 2000®

Step 1. Open File | Modify

First of all, select the File | Modify menu. This will open the Modify file structure dialog box:

modify dbf file structure

In this dialog you can see all fields of the database as a list displaying name, type, size of each fields as well as their order. Note that you cannot change the contents of these fields here. You need to edit the DBF file instead to do this. This dialog box only changes the structure of the DBF file.

Step 2. Add, edit or delete fields

To edit a new field, click the New field button and fill in the name, the type and the size of the new field. Similarly, to edit the selected field, click the Edit button.

To delete a field, select it in the list, then click the Delete button. You will need to confirm this action.

Step 3. Change the order of fields

To change the order of fields, select a field and move it up or down using the arrow button just to the right of the list.

To adding fields from other dbf file, click the Import fields button.

Step 4. Optimize field sizes (optional)

Finally, the Optimize button allows you to set each field length to its minimum possible value, determined by the maximum length of this field contents. For example, if among all records the longest value in the “Last name” field is “Schwarzenegger”, this field will be cut to 14 characters length.

Modify structure via Command Line

Rename fields

"c:\Program Files (x86)\DBF Viewer 2000\dbview.exe" d:\base\mybase.dbf /RENAME:OldField:NewField

Append fields

"c:\Program Files (x86)\DBF Viewer 2000\dbview.exe" d:\base\sample.dbf /ADDFIELDS:ID:N10,NAME:C20,MYDATE:D, NOTE:M

Delete Field

"c:\Program Files (x86)\DBF Viewer 2000\dbview.exe" d:\base\sample.dbf /DELFIELDS:MYDATE

Delete Field from Multiple Files

"c:\Program Files (x86)\DBF Viewer 2000\dbview.exe" d:\base\*.dbf /DELFIELDS:MYDATE

Append fields for Multiple Files

"c:\Program Files (x86)\DBF Viewer 2000\dbview.exe" d:\base\*.dbf /RECURSE /ADDFIELDS:ID:N10,NAME:C20

Rename fields for Multiple Files

"c:\Program Files (x86)\DBF Viewer 2000\dbview.exe" d:\base\*.dbf /RECURSE /RENAME:Name1:Name2

Frequently Asked Questions

Will changing the structure delete my data?

Adding, renaming and reordering fields keeps your records. Deleting a field removes its data, so the program asks you to confirm this action.

Can I change a field type or size in an existing DBF file?

Yes. Select the field in the Modify dialog and click Edit.

Can I rename or delete fields in many DBF files at once?

Yes. The command line supports renaming, appending and deleting fields for multiple files.

What does the Optimize button do?

It sets each field length to the minimum possible value, determined by the longest value in this field.

DOWNLOAD
for FREE

Updated Tue, 27 Oct 2026

See also: DBF File optimization, DBF to Excel, DBF to SQL, DBF to CSV, Filtering records,  Sorting records in dbf file, Command line options