Command Line
DBF Commander Professional provides to you the possibility to work with DBF files via the command line interface.
Thus, you can run it in MS-DOS mode with a defined parameters, or in a batch mode with using of a *.BAT file, or by Windows scheduler.
Below these commands are listed, their syntax and parameters. If you need some additional command(s), we can discuss it at our Forum. If the command(s) would be useful for other users, this will be implemented in a future release of DBF Commander Professional.
SQL query on DBF file
This command is similar to SQL queries execution. Syntax:
- <"sql_query_text"> - is the query text in SQL you need to be executed (in double quotes).
For example:
If the SQL query hasn't been executed successfully, a console window containing the SQL error will be shown. E.g.:

Import DBF file
This command is similar to Import DBF file command. Syntax:
- <input_file> - full name of the source file need to be imported.
- <output_file> - full name of the result DBF file.
Both of <input_file> and <output_file>must be in double quotes. For example:
In case of import from CSVfile, there is one more parameter - delimiter. E.g.:
If this parameter is not specified - the default value (comma) is taking.
Export DBF file
This command is similar to Export DBF file command. Syntax:
- <input_file> - full name of the source DBF file need to be exported.
- <output_file> - full name of the result file.
Both of <input_file> and <output_file> must be in double quotes. For example:
In case of export to CSV file, there is one more parameter - delimiter. E.g.:
If this parameter is not specified - the default value (comma) is taking.
Import from database to DBF file
This command is similar to Import from DBMS command. Syntax:
- <server_table_name> - source table in the database.
- <dbf_file_name> - full name of the destination DBF file accepting the data.
- <connection_string> - connection string to be used to connect to the database.
Both of <dbf_file_name> and <connection_string> must be in double quotes.
In the example below we'll transfer data from table named "customer_table" to "D:\Data\customer.dbf" file (DBMS - MS SQL Server, server name - "test_server", database name - "test_db", login - "user1"):
Export from DBF file to database
This command is similar to Export to DBMS command. Syntax:
- <dbf_file_name> - full name of the source DBF file need to be exported.
- <server_table_name> - destination table in the database.
- <connection_string> - connection string to be used to connect to the database.
Both of <dbf_file_name> and <connection_string> must be in double quotes.
In the example below we'll transfer data from "D:\Data\customer.dbf" file into table named "customer_table" (DBMS - MS SQL Server, server name - "test_server", database name - "test_db", login - "user1"):
Convert DBF file
This command is similar to Convert to command. Syntax:
- <file_name> - full name of the DBF file, whose code page or encoding must be changed.
- <new_codepage_or_encoding> - new code page number (code pages list), or "utf-8" or "ansi" parameters.
For example, if you need to convert DBF file from 850 International MS-DOS to 1252 Windows ANSIcodepage, use:
If this DBF file to convert is a Windows ANSIfile already, the appropriate console window will appears:

To convert a DBF file from Windows ANSI to UTF-8encoding, use the following command:
While this conversion also note:
To convert a DBF file from UTF-8 to Windows ANSIencoding, use the following command:
Set DBF file codepage
This command is similar to Set Code Page command. Syntax:
- <file_name> - full name of the DBF file, whose code page flag need to be changed.
- <new_codepage> - new code page number (code pages list).
For example, the command
sets code page of the file to 850 International MS-DOS.
Encrypt DBF file and Decrypt DBF file
This command is similar to Encrypt and Decrypt DBF file command. Syntax:
- -enc or -dec option - the flag to encrypt or decrypt a DBF file, respectively.
- <input_file> - full name of the source DBF file need to be encrypted or decrypted.
- <output_file> - full name of the result file.
- <password> - the encryption/decryption password.
E.g.:
or

