Files

Delete By File Name

Takes out files whose names are on a list: by default it copies everything else to the output, and in place it moves the listed files into the run folder instead of deleting them.

Free Command line: remove-by-name Version 1.0

Delete By File Name matches each file name against a list you paste or load from a text file. In the default copy mode, every file that is not on the list is copied (verified by MD5) into the run's files folder with the same folder structure, and the input is untouched. Every file is reported as Copied or Excluded.

With Change files in place on, the matched files are moved out of the input folder into the run folder's removed folder, keeping their relative path. Nothing is destroyed, and every move can be undone from the report. A list of entries that matched nothing is written to not-found.csv, and the exact list used is saved as name-list.txt.

Use it when

How to run it

  1. Choose the folder as Input and an Output folder outside it.
  2. Paste the names into List, one per line, or choose a List file (or both).
  3. Choose Match: Exact, Stem or Contains.
  4. Leave Change files in place off to make a copy without the listed files; turn it on only to move them out of the input (you will be asked to confirm).
  5. Click Run.
  6. Read the notes, click Open report, and open not-found.csv.

Settings

Every setting has the same help beside it in the app. On the command line, pass each as --name value; ltk help remove-by-name lists them.

Settings

SettingWhat it doesType and default
List
--list
File names to remove, one per line (paste from Excel is fine). Lines starting with # are ignored. Matching ignores letter case.
One name per line; pasting a column from Excel works. Surrounding spaces and quotes are removed, blank lines and lines starting with # are ignored, and duplicates are dropped. Matching ignores letter case. An entry containing path characters (such as \ or :) is refused and listed in errors.csv: give names, not paths.
text (lines)
empty
List file
--list-file
Optional text file with names, one per line. Combined with the list above.
A plain text file with one name per line, added to anything typed in List. If the file cannot be found, the run stops.
file
empty
Match
--match
How names are matched: Exact (full name with extension), Stem (name without extension, so every format of a document), or Contains (the name contains the entry; broadest, check the report).
Exact: the full name with extension. Stem: the name without its extension (or the full name), so ABC0001 matches ABC0001.pdf and ABC0001.docx. Contains: the name contains the entry anywhere, so draft matches Contract draft v2.docx; this is the broadest and can catch more than intended.
choice: Exact, Stem, Contains
Exact

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.
Matched files are moved to removed\<relative path> in the run folder. Their MD5 is recorded before the move, and every move is logged before and after it is made in in-place-journal.csv. To undo, move files back using OldPath and NewPath in the report.
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.
In copy mode, only files the run reads are copied. If you set Extensions, files with other extensions are left out of the copy altogether, not just left unmatched.
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 remove-by-name.csv, errors.csv and manifest.json (see Run folders and manifests).

Report columns

Check the result

Tips
  • Use Stem with a list of document IDs to remove natives, PDFs and text files together.
  • Keep name-list.txt and the report with the matter as a record of what was removed and why.
Watch out for
  • Despite its name, the tool never deletes files. In place it moves them into the run folder; delete that folder yourself only once you are sure.
  • In place changes the evidence folder. Run in copy mode first and check the report before using it.

From the command line

The command line is part of LitTechKit Pro. See Command line.

ltk run remove-by-name --input "D:\Matter\Production" --output "D:\Matter\Clean" --list-file "D:\Matter\clawback.txt" --match Stem

Related tools