Assign Document IDs
Renames files to document IDs in folder order, either prefix plus number (ABC0000001) or prefix, box, folder and page (ABC.5000.0001.0001), and maps every ID back to its original file.
Assign Document IDs numbers files in natural folder order (so file2 comes before file10). By default it writes renamed copies to the output folder and leaves the input untouched. It can instead rename the files in the input folder (in place), or just preview the IDs without changing anything.
Every ID is worked out before any file is copied or renamed. If the numbering would run out (too few digits, or every box used), the run stops and nothing is changed. The report maps each ID to the original path and MD5, so the numbering can always be traced or reversed.
Use it when
- You need to give a set of documents control numbers or document IDs before review or exchange.
- You need box/folder/page style IDs, such as for a Ringtail-style production.
- You need page-based numbering (one number per page, like Bates numbers) on file names without stamping the pages.
- You want to check what IDs a set of settings would produce before committing to them.
How to run it
- Put the files in the order you want them numbered; the tool follows natural folder order.
- Choose the folder as Input and an Output folder outside it.
- Choose the Profile (Numbering or BoxFolderPage) and Increment (Document or Page), and enter the Prefix.
- Fill in Start number and Digits, or the box, folder and page ranges.
- Tick Preview and click Run; open the report and check the IDs.
- Untick Preview and run again. Leave Change files in place off unless you mean to rename the originals; if you turn it on you will be asked to confirm.
Settings
Every setting has the same help beside it in the app. On the command line, pass each as --name value; ltk help assign-ids lists them.
Settings
| Setting | What it does | Type and default |
|---|---|---|
Profile--profile |
Numbering: prefix + number (ABC0000001). BoxFolderPage: prefix, box, folder and page separated by the delimiter (ABC.5000.0001.0001); when page reaches its 'to' value it starts again and the folder goes up by one, and likewise folder into box. | choice: Numbering, BoxFolderPageNumbering |
Increment--increment |
Document: each file uses one number. Page: each file uses one number per page, like Bates numbering (PDF and TIFF pages are counted; other files count as 1 page). The report shows each file's first and last ID. Page counts the pages of PDFs and TIFFs, so a 12-page PDF uses 12 numbers and the report shows its first and last ID. Any other file, or one whose pages cannot be counted, counts as 1 page and its row says so. Convert files to PDF first if they must be numbered by page. |
choice: Document, PageDocument |
Prefix required--prefix |
Text at the start of every ID, e.g. ABC. Must be usable in a file name. Characters such as \ / : * ? " < > | stop the run before anything is done. |
text empty |
Delimiter--delimiter |
BoxFolderPage: the separator between prefix, box, folder and page (ABC.5000.0001.0001). May be empty. Shown when profile = BoxFolderPage |
text. |
Start number--start-number |
Numbering: the first number to assign. Shown when profile = Numbering |
number1 |
Digits--digits |
Numbering: digits in the number, padded with leading zeros (7 gives 0000001). Between 1 and 18. Choose enough for the whole matter, not just this set: the run stops if a number would need more digits. Shown when profile = Numbering |
number7 |
Box: cycle from--box-from |
BoxFolderPage: first box number. Each part is padded to the number of digits of its 'to' value. Each part (box, folder, page) is padded to the number of digits in its 'to' value, so a box range of 1 to 9999 gives 0001. When page passes its 'to' value it starts again and the folder goes up by one; likewise folder into box.Shown when profile = BoxFolderPage |
number1 |
Box: to--box-to |
BoxFolderPage: last box number. The run stops before changing anything if the files would need more. Shown when profile = BoxFolderPage |
number9999 |
Folder: cycle from--folder-from |
BoxFolderPage: first folder number in each box. Shown when profile = BoxFolderPage |
number1 |
Folder: to--folder-to |
BoxFolderPage: last folder number in a box; after it the box goes up by one. Shown when profile = BoxFolderPage |
number9999 |
Page: cycle from--page-from |
BoxFolderPage: first page (or document) number in each folder. Shown when profile = BoxFolderPage |
number1 |
Page: to--page-to |
BoxFolderPage: last page number in a folder; after it the folder goes up by one. With Increment = Page, a document that doesn't fit in the rest of a folder starts at the next folder. With Increment = Page, a document that does not fit in what is left of a folder starts at the next folder. Only a document with more pages than a whole folder runs on across folders; a note counts these. Shown when profile = BoxFolderPage |
number9999 |
Preview--preview |
Only show the IDs: the report lists every file with the ID (and new name) it would get, but nothing is copied or renamed. | yes/nofalse |
Keep extension--keep-extension |
Keep each file's original extension (ABC0000001.pdf). Off: the new name has no extension. | yes/notrue |
Layout--layout |
Keep the folder structure (each file is renamed where it is), or Flatten (every file goes into one folder; IDs are unique, so there are no clashes). Keep renames each file where it sits. Flatten puts every file in one folder; because IDs are unique there are no name clashes. |
choice: Keep, FlattenKeep |
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 |
Change files in place--in-place |
Off (default): changed copies are written to the output folder and the input is untouched. On: files in the input folder itself are renamed/moved, and every change is logged in the report. You will be asked to confirm. Renames the files in the input folder. If an ID is already the name of another file, that file is not renamed and gets an Error row; its number stays used rather than being shifted. Every change is also written, before and after it is made, to in-place-journal.csv. |
yes/nofalse |
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 assign-ids.csv, errors.csv and manifest.json (see Run folders and manifests).
files\…\ABC0000001.pdf …: Verified copies named by ID (copy mode only).assign-ids.csv: One row per file: DocId and EndId, Pages, OriginalPath, NewPath, MD5, OriginalName, Action (Copy, Rename or Move), Status (Copied, Renamed, Unchanged, Preview or Error) and Message.in-place-journal.csv: In-place runs only: a log of every rename, written as it happens.
Report columns
DocIdEndIdPagesOriginalPathNewPathMD5OriginalNameSizeBytesActionStatusMessage
Check the result
- Read the note giving the first and last ID assigned and the number of files (and pages).
- Filter Status for Error and read Message.
- With Increment = Page, filter Message for files counted as 1 page.
- A preview note also says the first and last ID the settings can produce, which helps when choosing digits or ranges.
- With Keep extension off, the new names have no extension at all; only do this if the receiving system expects it.
- Keep the report with the matter: it is the mapping from each ID back to the original file.
- In place changes the evidence folder. Run a preview first, and make sure you have a copy.
- Numbering follows file and folder names, not dates or families. Arrange or rename folders first if the order matters.
From the command line
The command line is part of LitTechKit Pro. See Command line.
ltk run assign-ids --input "D:\Matter\Production" --output "D:\Matter\IDs" --prefix ABC --start-number 1 --digits 7 --increment Page --preview
Related tools
- Bates Stamp: Stamps sequential Bates numbers and an optional legend (e.g. CONFIDENTIAL) on every PDF page, correctly placed on rotated and cropped pages, writing stamped copies with a Beg/End Bates report.
- Page Counts: Counts pages in PDFs and slides in PowerPoint files exactly, and reports Word's stored page count (as last saved).
- 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 To PDF: Converts Word, Excel, PowerPoint, RTF, text, email (.eml, .msg) and image files (including multi-page TIFFs) to PDF using the Microsoft Office on this PC, from read-only working copies with macros and external links disabled, keeping saved values and showing hidden content, and reports the page count of each PDF. AutoCAD drawings (.dwg, .dxf, R14 and later) are converted without AutoCAD, one page per layout.