file does not recognize Visual FoxPro table files

Krzysztof Żelechowski program.spe at home.pl
Mon Jan 14 13:40:50 EET 2008


Microsoft Visual FoxPro table files are a variant of dBase table files.
They are documented by Microsoft at
<http://msdn2.microsoft.com/pl-pl/library/st4a0s68(en-us,VS.80).aspx>.
While the file utility correctly recognizes dBase table files, it fails
to recognize the FoxPro variant.

Example:
? file 'FASTE.DBF' 
> FASTE.DBF: DBase 3 data file (14 records)
? file 'aaa.DBF'
> aaa.DBF: data
? python 'doit.py' 'FASTE.DBF'
> 
FoxBASE+
Latest update 1995-03-16
14 records
flags: 0
Code page: 0
>
? python 'doit.py' 'aaa.DBF'
>
Visual FoxPro
Latest update 2003-10-03
1 records
flags: 0
Code page: 200
>

where 'doit.py' is a custom script to parse the header along the lines
of the documentation.



More information about the File mailing list