Česká verze
TXT2DBF.EXE and DBF2TXT.EXE are command line utilities for unattended conversion between dBIII database format and text file format. You may find more convenient to edit database in a text form using your favourite plain-text editor. You can easily add or delete rows and columns, change width of fields, find and replace data etc. Updated text can be converted back to DBF format using TXT2DBF utility and then processed with database application or imported to a spreadsheet.
Both utilities are available free of charge for anybody. They may be redistributed unmodified in the form of original archive only, as downloaded from www.vitsoft.info. Use at your own risk.
This is a small example of a short database in text format accepted with TXT2DBF:
|FILENAME |FILESIZE|DATUM |PIC|PICNAME |DESCRIPTION | |Character |Numeric |Date |Log|Character |Character | | 12| 7| 8| 1| 12| 20| +------------+--------+--------+---+------------+--------------------+ |CV557.ZIP | 12472|19961112|N | |File description | |CV373.ZIP | 1259252|19961112|Y |CV373.BMP |Some other file | |CV549.ZIP | 1274600|19961112|Y |CV549.BMP |Another file | |CV508.ZIP | 221299|19961112|Y |CV508.BMP |Yet another file |
Fields are separated with special separator character. First four lines represent database header and have special meaning:
Some simplifications are allowed in TXT2DBF conversion:
Field type names in 2-nd line may be abbreviated to C,N,L,D,M.
Any character may be used as a separator provided that it does not occur
anywhere else in data. Each line must start with a separator character.
The last separator may be omitted.
Different lines may have different separators.
Data may be surrounded with spaces, these spaces are stripped off during
conversion and data are aligned to the left (numeric data to the right).
Spaces on the left will be not stripped off if parameter /V is used.
Data exceeding the field width are trimmed.
Empty lines are ignored.
Number of fields in the first three lines must match one another.
For data lines (4th and next) this rule is not that strict. Missing
fields from incomplete data lines are considered to be empty.
Superfluous fields in data lines are ignored.
Records marked for deleting (*) are omitted from DBF2TXT conversion.
DBF2TXT [parameters] input_file_name [output_file_name] TXT2DBF [parameters] input_file_name [output_file_name]
Default extensions are DBF and TXT. Default output file name corresponds
to the input file name.
Parameter /O will supress the warning query when output
file already exists. This is useful in batch conversions.
Additional TXT2DBF parameters:
When parameter /T is used, fields width in 3-rd line
is ignored and real fields width is calculated from fields content
(without white spaces) during an additional conversion pass.
Parameter /V tells TXT2DBF not to strip off the white
spaces from the left side of data fields. This can be useful
for later sorting by columns with variable data width.
With parameter /Cxxxx we can set the codepage
information to DBF header (the word at offset 32).
xxxx must be replaced with required hexadecimal
codepage value.
DBF2TXT \\Server\share\path\mydata.dbf "D:\Documents And Settings\MyName\mydata.txt" TXT2DBF /O /C01C8 "D:\Documents And Settings\MyName\mydata.txt"
Field width must not exceed 255.
Maximum of 255 fields is allowed.
Total records (line) width must not exceed 4096.
Number of records is unlimited.
UNC and long file names are supported in Windows version only.