logo
DBF Converter
News Download Features Order Contacts

DBF Converter Command Line

Download

Single file conversion


dbfcnv.exe file.dbf outfile.ext [OPTIONS]

example:
dbfcnv.exe file.dbf out.csv

Batch conversion


dbfcnv.exe *.dbf destdir /TOEXT [OPTIONS]

where ext - (.dbf, .txt, .htm, .prg, .xml, .xls, .xlsx, .csv, .sql, .rtf, .sdf, .tsv)
example
dbfcnv.exe c:\mybase\*.dbf c:\out\ /TOXLS

Common options


/LOG|/LOG:logfile - generate log file
dbfcnv.exe sample.dbf sample.xls /LOG /SKIPD - skip deleted records

/SKIPEMPTY - skip empty records.

/ONLYDELETED - export only deleted records


/HDR - for put the fields names in first line.

/LF - use LF(0xA) as row delimiter (useful for unix systems), default: CRLF
/REVERSE - export in reverse order

/UTF8 - Convert to UTF-8 encoding


/COLUMNS - set columns for export
syntax:
/COLUMNS:field1[:newname],field2[:newname] [/EXCLUDE]

example 1
dbfcnv.exe sample.dbf sample.xls /COLUMNS:CUST_NO:custom numbers,NAME:custom name

example 2
dbfcnv.exe sample.dbf sample.csv /COLUMNS:NAME,STREET

example 2 (exclude columns)
dbfcnv.exe sample.dbf sample.csv /COLUMNS:NAME,STREET /EXCLUDE


/COLUMNSLIST - set columns for export from text file
example:
dbfcnv.exe sample.dbf sample.csv /COLUMNSLIST:columns
where columns - text file with column names (one per line)

/FILTER:filterfile

filter file format:

Field name:Value|Expression


Examples:

single file conversion:

dbfcnv.exe mybase.dbf out.txt /SEP;

multiple file conversion:

dbfcnv.exe c:\base\*.dbf c:\exports\ /TOSQL

Text/CSV options

/SEPx - where x delimiter

/SEPPIPE - use '|' as delimiter
/SEPTAB - use Tab as delimiter

/SINGLEQUOTA - single quotas
/DOUBLEQUOTA - double quotas

/ALLQUOTAS - enclose all fields in quotas.

Dbase options


/DBASE3 - DBASE III format
/DBASE4 - DBASE IV format
/VFP - Visual Foxpro format

example:
dbfcnv.exe c:\base\myfile.dbf out.dbf /DBASE4

SQL options

/ORACLE - use Oracle syntax
/MYSQL - use MySQL syntax
/SQL2000 - use SQL2000 syntax
/POSTGRESQL - PostgreSQL syntax

Excel options


export to Excel 2003 (xml-based):
dbfcnv.exe file.dbf outfile.xls /XML

HTML options

/ASFORM - one record on the one page

/NUMBER - record number as first column

/MAXPERPAGE - maximum records on the one page
example: /MAXPERPAGE=100

/TITLE - page title
example: /TITLE=Customers

/COLOR - Text color
example: /COLOR=#0000ff

/BACKGROUND - Background color
/BACKGROUND=#c0c0c0
Download

Copyright © HiBase Group, 2002-2017