Files

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.

PRO Command line: assign-ids Version 2.0
A Pro toolIn the free edition it works on up to 25 documents per run, so you can try it on real work. Compare Free and Pro.

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

How to run it

  1. Put the files in the order you want them numbered; the tool follows natural folder order.
  2. Choose the folder as Input and an Output folder outside it.
  3. Choose the Profile (Numbering or BoxFolderPage) and Increment (Document or Page), and enter the Prefix.
  4. Fill in Start number and Digits, or the box, folder and page ranges.
  5. Tick Preview and click Run; open the report and check the IDs.
  6. 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

SettingWhat it doesType 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, BoxFolderPage
Numbering
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, Page
Document
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
number
1
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
number
7
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
number
1
Box: to
--box-to
BoxFolderPage: last box number. The run stops before changing anything if the files would need more.
Shown when profile = BoxFolderPage
number
9999
Folder: cycle from
--folder-from
BoxFolderPage: first folder number in each box.
Shown when profile = BoxFolderPage
number
1
Folder: to
--folder-to
BoxFolderPage: last folder number in a box; after it the box goes up by one.
Shown when profile = BoxFolderPage
number
9999
Page: cycle from
--page-from
BoxFolderPage: first page (or document) number in each folder.
Shown when profile = BoxFolderPage
number
1
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
number
9999
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/no
false
Keep extension
--keep-extension
Keep each file's original extension (ABC0000001.pdf). Off: the new name has no extension. yes/no
true
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, Flatten
Keep

Common settings

SettingWhat it doesType 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/no
false
Recurse
--recurse
Include sub-folders. yes/no
true
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. number
4

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

Report columns

Check the result

Tips
  • 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.
Watch out for
  • 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