Guidance
指路人
g.yi.org
software / rapidq / Examples / Database / rqmysql2dbf / dbf2txt.htm

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
DBF2TXT & TXT2DBF

DBF2TXT & TXT2DBF

Èeská verze

Overview

TXT2DBF.EXE and DBF2TXT.EXE are command line utilities for (batch) 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 speadsheet.

License

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.

TXT format definition

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:

  1. Field names.
  2. Field types: Character, Numeric, Logical, Date or Memo.
  3. Field widths. E.g. 5.2 represents format 999.99 in Numeric type.
  4. Header separator, ignored.

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.

Syntax

    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 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.

Example

 DBF2TXT \\Server\share\path\mydata.dbf "D:\Documents And Settings\MyName\mydata.txt"
 TXT2DBF /O /C01C8 "D:\Documents And Settings\MyName\mydata.txt"

Limitations

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.

History

1.00 15.7.1994
First release.
1.20 17.3.2001
English version
1.30 11.7.2001
Disk free space check supressed.
2.00 7.3.2004
Windows version integrated with previous 16bit version into one executable.
HTML documentation is in separate files now.
Parameters /K /L /S /D are tolerated for backward compatibility but no longer supported.
Progress indication, Czech error reports and disk space check were omited.
掌柜推荐
 
 
¥289.00 ·
 
 
¥1,080.00 ·
 
 
¥1,380.00 ·
 
 
¥638.00 ·
 
 
¥1,290.00 ·
 
 
¥1,420.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-06-19 07:43:40