DBF Files via Command Line

You can run DBF Viewer in the Command prompt or use from .BAT files or run this commands from other applications.

If you need Additional/Custom command line options, please Contact us.

DBF Viewer Command Line:

"c:\Program Files\DBF Viewer 2000\dbview.exe" file.dbf [/EXPORT [/SORT /NOHDR /FROMRECORD /LASTRECORD /ENDFLD /STARTFLD /EXCLUDE] | /EXPORTSTATS | /APPEND | /FILL | /REPLACE | /DELETEDUPS [/KEEPLAST] | /RECALL | /CREATE | /PACK | /PACKMEMO | /EXPORTSTRUCT [/ADD] | /DELETE:N,N | /FILTER2:FLD:VALUE | /FILTER:filterfile /DELETE| /RENAME:fld,newfld | /REMOVESPACES] | [/CLEARHISTORY ]

(Note: For Windows 64bit full path: "c:\Program Files (x86)\DBF Viewer 2000\dbview.exe")

Open dbf file from the command line

"c:\Program Files\DBF Viewer 2000\dbview.exe" file.dbf [/RO | /OEM | /ANSI | /SHARED]

Start without Open dialog

"c:\Program Files\DBF Viewer 2000\dbview.exe" /NOOPEN

Run DBF Viewer 2000 in read only mode

"c:\Program Files\DBF Viewer 2000\dbview.exe" file.dbf /RO

"c:\Program Files\DBF Viewer 2000\dbview.exe" /RO

Run in shared mode

"c:\Program Files\DBF Viewer 2000\dbview.exe" file.dbf /SHARED

"c:\Program Files\DBF Viewer 2000\dbview.exe" /SHARED

Export DBF file structure to Text/CSV file

"c:\Program Files\DBF Viewer 2000\dbview.exe" mybase.dbf /exportstruct:struct.txt

Use OEM characters

"c:\Program Files\DBF Viewer 2000\dbview.exe" file.dbf /OEM

"c:\Program Files\DBF Viewer 2000\dbview.exe" /OEM

Use ANSI characters

"c:\Program Files\DBF Viewer 2000\dbview.exe" file.dbf /ANSI

"c:\Program Files\DBF Viewer 2000\dbview.exe" /ANSI

Append/Import records from DBF, TXT, CSV, Excel(XLS, XLSX, XLSM) and Paradox files

Examples:

Append records from other dbf file:

"c:\Program Files\DBF Viewer 2000\dbview.exe" /APPEND:file1.dbf,file2.dbf

Import records from XLSX file to dbf file:

"c:\Program Files\DBF Viewer 2000\dbview.exe" /APPEND:file1.dbf,file2.xlsx

Import records from CSV file :

"c:\Program Files\DBF Viewer 2000\dbview.exe" /APPEND:file1.dbf,file2.csv /SEP;

or "c:\Program Files\DBF Viewer 2000\dbview.exe" /APPEND:file1.dbf,file2.csv /SEP; /ZAP

where /SEP: - use ';' as delimiter, /ZAP - remove all records before append.

Open DBF file with filter

"c:\Program Files\DBF Viewer 2000\dbview.exe" myfile.dbf /FILTER:myfilterfile

filter file format:

Field name:Value|Expression

"c:\Program Files\DBF Viewer 2000\dbview.exe" myfile.dbf /FILTER2:Name:Jim

Create DBF file

"c:\Program Files (x86)\DBF Viewer 2000\dbview.exe" /create:d:\DBF\newfile.dbf /fields:NUM:N10,STR:C20,DATE:D

Export DBF to other formats

"c:\Program Files\DBF Viewer 2000\dbview.exe" file1.dbf /EXPORT:outfile.ext [options]

The command export records from file1.dbf to file1.ext, where ext - (txt, csv, dbf, sql, xml, xls, xlsx, html, rtf, sdf)

options:

/SEP set delimiter (txt/csv format only)

/SKIPD skip deleted records

/SKIPM skip memo fields

/FILTER set filter

syntax: /FILTER:filterfile

each line in the filter file: fieldname:value | expression

Price:>100
Status:!Empty

/WFILTER set Wide filter

syntax: /WFILTER:value

/COLUMNS select columns

syntax: /COLUMNS:field1,field2

/SORTBY:field Sort by field

Export dbf to csv format:

"c:\Program Files\DBF Viewer 2000\dbview.exe" file1.dbf /EXPORT:file2.csv [/SEPx | /SEPTAB | /SEPPIPE | /SEPSPACE | /FILTER| /WFILTER | /UTF8]

where x delimiter

"c:\Program Files\DBF Viewer 2000\dbview.exe" file1.dbf /EXPORT:file2.txt /SEP: /HDR

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

dbview.exe sample.dbf /EXPORT:sample.txt /COLUMNS:NAME,STREET /SEPTAB

dbview.exe sample.dbf /EXPORT:sample.txt /COLUMNS:NAME,STREET /SEPTAB /WFILTER:NY

where: export only columns NAME and STREET, TAB delimiter

/SEPPIPE - use pipe as delimiter

/SEPSPACE - use space as delimiter

Export dbf to dBase III format

"c:\Program Files\DBF Viewer 2000\dbview.exe" file1.dbf /EXPORT:file2.dbf /DBASE3

export dbf file to visual foxpro format

"c:\Program Files\DBF Viewer 2000\dbview.exe" file1.dbf /EXPORT:file2.dbf /VFP

Export dbf to sql format:

"c:\Program Files\DBF Viewer 2000\dbview.exe" file1.dbf /EXPORT:file2.sql [/mysql | /oracle | /mssql | /postgresql] [/NOCREATESTATEMENT]

/NOCREATESTATEMENT - allows you generate sql script without CREATE TABLE statement.

export dbf to xlsx format:

"c:\Program Files\DBF Viewer 2000\dbview.exe" file1.dbf /EXPORT:file2.xlsx /WFILTER:NY

export dbf to xls format:

"c:\Program Files\DBF Viewer 2000\dbview.exe" file1.dbf /EXPORT:file2.xls

export dbf to xls as xml-based format (since Excel 2003)

Allows you export memo fields to excel.

"c:\Program Files\DBF Viewer 2000\dbview.exe" file1.dbf /EXPORT:file2.xls /XML

See also: Export DBF to XLS, Export DBF to CSV, Export DBF to XML, Export DBF to SQL

Replace records in dbf file

"c:\Program Files\DBF Viewer 2000\dbview.exe" /REPLACE:fieldname:oldvalue:newvalue [/substr | /case]

/substr - replace substring

/case   - case sensitive comparison

example:

"c:\Program Files\DBF Viewer 2000\dbview.exe" base.dbf /REPLACE:name:Tom:Peter

Fill records in dbf file

"c:\Program Files\DBF Viewer 2000\dbview.exe" /FILL:fieldname:value

example:

"c:\Program Files\DBF Viewer 2000\dbview.exe" base.dbf /FILL:STATUS:OK

Delete duplicates from dbf file

"c:\Program Files\DBF Viewer 2000\dbview.exe" base.dbf /DELETEDUPS

Auto open last dbf file and show last record in Record View mode

"c:\Program Files\DBF Viewer 2000\dbview.exe" d:\base.dbf /GOLASTRECORD

Fix dbf file with incorrect size

"c:\Program Files\DBF Viewer 2000\dbview.exe" file.dbf /FIX

or with wildcards

"c:\Program Files\DBF Viewer 2000\dbview.exe" *.dbf /FIX

Pack DBF file

"c:\Program Files\DBF Viewer 2000\dbview.exe" file.dbf /PACK

or with wildcards

"c:\Program Files\DBF Viewer 2000\dbview.exe" *.dbf /PACK

Pack only Memo file

"c:\Program Files\DBF Viewer 2000\dbview.exe" file.dbf /PACKMEMO

Rename Fields

"c:\Program Files\DBF Viewer 2000\dbview.exe" mybase.dbf /RENAME:Name1:Name2

Remove leading spaces

"c:\Program Files\DBF Viewer 2000\dbview.exe" mybase.dbf /REMOVESPACES

Clear history

"c:\Program Files\DBF Viewer 2000\dbview.exe" /CLEARHISTORY


DOWNLOAD
for FREE