Как напрямую читать файлы .dtl в DataFrame?
Анализирую логи, которые АСУТП сохраняет в файлы *.dtl. Чтобы импортировать их в DataFrame, сначала перевожу их в .xlsx с помощью утилиты производителя (Easy Builder).
Проблема в том, что у меня этих файлов тысячи, а конвертер за один раз больше 15 штук не принимает.
Есть ли какие-нибудь способы напрямую читать файлы .dtl?
Файл для примера прилагаю: download .dtl (31 kb).
Ответы (1 шт):
Судя по документации утилита для конвертирования может работать из командной строки:
EasyConverter.exe /t1 /s "C:\Format.lgs" "C:\Src.dtl" "C:\Dest.xls"
Parameter Description
/c{a,8,u}Optional, specifies encoding method, only required when exporting a .csv file.
/ca: ASCII (Default)
/c8: UTF-8/cu:Unicode
/t{0,1}Optional, specifies whether or not to include millisecond information.
EasyConverter EasyBuilder Pro V6.05.01
/t0: Excludes millisecond information.
/t1: Includes millisecond information. (Default)
/sOptional, specifies whether or not to import settings file. To import settings file, specify the path of .lgs file following/s. For example:/s "C:\Format.lgs""Src file" Specifies the source file path, and the file format should be: .dtl, .evt, or .db
"Dest file" Specifies the destination file path, and the file format can be: .xls or .csv. See Note.
Поэтому можно легко сгенерировать .BAT / .CMD файл, в котором данная утилита вызывается для каждого .dtl файла.