Convert Load File
Converts load files from one format to another: DAT, CSV, tab-delimited and Excel data files, and Opticon OPT and IPRO LFP image files, with optional field, path, volume and encoding changes.
Different platforms want different load files. This tool reads each data load file (.dat, .csv, .xlsx) and image load file (.opt, .lfp) in the input and writes a converted copy in the run's files folder, in the same sub-folders as the original. The originals are not changed.
Along the way it can keep only some fields, put them in a new order and rename them, rewrite the start of every path, set the volume name in an image file and choose UTF-8 or ANSI encoding. Anything that could not be carried over exactly is described in the report's Details column.
Use it when
- You need to read a DAT in Excel: converting to Excel keeps every value as text, so Bates numbers and account numbers keep their leading zeros.
- A platform needs CSV or tab-delimited data, or an older workflow needs a Concordance DAT in ANSI.
- Your platform wants an LFP but the production came with an OPT, or the other way round.
- The paths in a load file point to the producing party's server (for example
\\server\prod\VOL001\) and need to point to where you have put the production. - Field names must be changed to match your platform's (for example
BEGDOCtoBegBates).
How to run it
- Choose the folder holding the load files, or a single load file, as Input.
- Choose an Output folder.
- Set Convert data files to (Excel, Dat, Csv or Tab) and Convert image files to (Opposite, Opt or Lfp).
- If needed, fill in Fields, Path columns, Path from, Path to and Volume under Fields and paths.
- Choose the Encoding for the new files.
- Click Run, then Open report and read the Details column for each file.
Settings
Every setting has the same help beside it in the app. On the command line, pass each as --name value; ltk help convert-load-file lists them.
Settings
| Setting | What it does | Type and default |
|---|---|---|
Convert data files to--data-to |
Format for data load files (.dat, .csv, .txt, .xlsx): Excel, Dat (Concordance), Csv or Tab. | choice: Excel, Dat, Csv, TabExcel |
Convert image files to--image-to |
Format for image load files: Opposite (OPT to LFP, LFP to OPT), Opt or Lfp. | choice: Opposite, Opt, LfpOpposite |
Data file format--format |
How the data files are read. Auto recognises a Concordance DAT (þ and ASCII 20), CSV, tab, pipe or semicolon. | choice: Auto, Dat, Csv, TabAuto |
Encoding--encoding |
Encoding of the new DAT, CSV, tab, OPT or LFP: Utf8 (Relativity and most platforms) or Ansi (older Concordance workflows). UTF-8 suits Relativity and most current platforms. With ANSI, any character Windows-1252 cannot hold becomes ? and Details says so. |
choice: Utf8, AnsiUtf8 |
Fields and paths
| Setting | What it does | Type and default |
|---|---|---|
Fields--fields |
Data file columns to keep, in this order; write Old=New to rename one (e.g. BEGDOC=BegBates). Empty keeps every column as it is. List the columns to keep, in the order you want them. Write Old=New to rename one, for example BEGDOC=BegBates. Columns not listed are left out. If a listed column is not in a file, that file is not converted and errors.csv names the columns it does have. |
list empty |
Path columns--path-columns |
Data file columns whose paths are rewritten by Path from / Path to. Empty: columns named …Path or …Link. When empty, columns whose names contain Path or Link are rewritten. Name the columns if your paths are in a column called something else. |
list empty |
Path from--path-from |
Start of the paths to replace, e.g. \\server\prod\VOL001\. Empty with Path to set: Path to is added in front of every path. The start of each path to replace, for example \\server\prod\VOL001\. Matching ignores case. Paths that do not start with it are left as they are and counted in Details. Leave it empty with Path to set to put Path to in front of every path. |
text empty |
Path to--path-to |
What replaces Path from, e.g. .\ or VOL001\. Applies to data file path columns and image file paths. Replaces Path from in the data file's path columns and in the image file's paths, for example .\ or VOL001\. |
text empty |
Volume--volume |
Volume name for the image file's lines. Empty keeps each line's volume. Applies to image files only. Empty keeps each line's own volume. |
text empty |
Newline marker--newline-marker |
Stands for a line break inside a DAT value (Concordance uses ®). It becomes a real line break in Excel, CSV and tab files, and the reverse. Empty: leave values as they are. Concordance stores a line break inside a value as ®. Going from DAT to Excel, CSV or tab, the marker becomes a real line break; going to DAT, real line breaks become the marker. Empty leaves values as they are. |
text® |
Common settings
| Setting | What it does | Type and default |
|---|---|---|
Input required--input |
Folder (or single file) to read. It is opened read-only and never modified. | folder empty |
Output required--output |
Folder for reports. Must not be inside the input folder. Each run gets its own sub-folder. | folder empty |
Recurse--recurse |
Include sub-folders. | yes/notrue |
Extensions--extensions |
Only process these extensions (e.g. .pdf, .docx). Empty means the tool's default set. | list empty |
Parallelism--parallelism |
Files processed at once. Use 1-2 for spinning disks or network shares. | number4 |
What you get
Each run creates its own folder inside the output folder, with the report convert-load-file.csv, errors.csv and manifest.json (see Run folders and manifests).
files\… (converted load files): One converted file per input load file, in the same sub-folder and with the same name, with the new extension (.xlsx,.dat,.csv,.txtfor tab,.optor.lfp).convert-load-file.csv: One row per load file: From and To formats, Records (records or image lines), Fields, Status, Details (anything changed or lost), Destination and the new file's SHA256.
Report columns
RelativePathFileNameFromToRecordsFieldsStatusDetailsDestinationSHA256
Check the result
- Read Details on every row. It reports, for example, records with the wrong number of fields, paths rewritten and paths left alone, values cut short to fit Excel, and characters lost to ANSI.
- Look at errors.csv for any file that could not be converted.
- Open a converted file and compare a few records with the original before you load it.
- The tool picks up
.dat,.csv,.xlsx,.optand.lfpfiles. A tab-delimited.txtload file is not picked up by default; add.txtto the extensions setting, or choose the file itself as Input. - Converting OPT to LFP writes one LFP line per page: a line for a multi-page file is numbered on from its key. Where a key does not end in a number, the line stays as one record and Details says so.
- LFP records that are not images (text, native or field records) are left out of the converted file, and Details gives the count.
- A data file with more records or fields than an Excel sheet can hold is not converted to Excel; errors.csv says so. Convert it to CSV or tab instead.
- Volume, Path from and Path to cannot contain commas or semicolons, because OPT and LFP files use them to separate fields. Paths that already contain them are counted in Details; rename those files or folders.
- A þ inside a value cannot be written to a DAT (it is the DAT's quote character); it becomes
_and Details says how many.
From the command line
The command line is part of LitTechKit Pro. See Command line.
ltk run convert-load-file --input "D:\Matter\Incoming\PROD001\DATA" --output "D:\Matter\Converted" --data-to Dat --path-from "\\server\prod\VOL001" --path-to "VOL001" --fields "BEGDOC=BegBates,ENDDOC=EndBates,NATIVEPATH"
Related tools
- Check Load File: Checks a production's DAT and OPT/LFP load files: missing images, natives and text, broken lines, duplicate or overlapping Bates numbers, page counts that disagree, and files nothing refers to.
- Create Load File: Creates a Concordance DAT and Opticon OPT load file for a production folder, grouping natives, images and text by Bates number.
- Convert CSV To Excel: Converts CSV, TSV and other delimited text files to Excel with every value kept as text (no lost leading zeros, rounded long numbers or reformatted dates), handling quoted line breaks, large files and Excel's size limits.