> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pnbr.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Bring a set of documents into the project

> A set of documents is in the project as Files, each dated, placed, held in one collection and searchable.

Guide · files

> **Use when**
>
> A person gives you a folder or a set of documents to add to the project.

> **Looking for something else?**
>
> A newer copy of a document the project already has (recipe [Bring in a new edition of a document](https://docs.pnbr.io/guides/new-edition.md)). One document you write yourself (card [Document](https://docs.pnbr.io/concepts/document.md)). Pages of a website (recipe [Save web pages or crawl a website into the project](https://docs.pnbr.io/guides/bring-in-a-website.md)).

## Outcome

Every document is one File with its source date, in one collection, and
search finds it by its words.

## Before you start

* Run `penumbra status`. Confirm the project and that no limit it lists stops
  uploads or collections (card rule [project.1](https://docs.pnbr.io/concepts/project.md#rule-project-1)).
* Read each document's own date: a date line, a signature date or a date in
  its name. That date is its source date, not today's date.
* Run `penumbra files find "<name>"` for each document. A document the project
  already has is a new edition, not a new File (recipe [new-edition](https://docs.pnbr.io/guides/new-edition.md)).

## Steps

1. Choose one collection name for the set. Create it with
   `penumbra files collections create "<name>"` (card rule [collection.1](https://docs.pnbr.io/concepts/collection.md#rule-collection-1)).
   MCP: none in the default catalog; use the CLI.
2. Upload each document on its own, with its source date:
   `penumbra files upload <path> --to /<folder> --source-date <date> --wait`.
   A folder upload sets no per-File date (card rules [file.4](https://docs.pnbr.io/concepts/file.md#rule-file-4) and [file.11](https://docs.pnbr.io/concepts/file.md#rule-file-11)).
   Expect `uploaded` and a File ID for each.
3. If an upload returns an existing File, the project already held those bytes.
   Do not upload it again (card rule [file.6](https://docs.pnbr.io/concepts/file.md#rule-file-6)).
4. Add each File to the collection:
   `penumbra files collections add "<name>" <file>` (card [collection](https://docs.pnbr.io/concepts/collection.md)).
5. Check readiness: `penumbra files collections readiness "<name>"`. Wait until
   every File is searchable by words (card rule [collection.3](https://docs.pnbr.io/concepts/collection.md#rule-collection-3)).

## Check

* `penumbra files list --collection "<name>"` lists every document once.
* `penumbra files versions <file>` shows the source date you set, for each File.
* `penumbra files search "<a phrase from one document>" --mode lexical` finds
  that document's passage.

## If it goes wrong

| You see | Read |
| - | - |
| A search finds nothing for a File you uploaded seconds ago | problem [new-file-not-searchable-yet](https://docs.pnbr.io/troubleshooting/new-file-not-searchable-yet.md) |
| An upload returned an existing File | problem [same-bytes-no-new-version](https://docs.pnbr.io/troubleshooting/same-bytes-no-new-version.md) |
| A File shows no source date | problem [file-has-no-source-date](https://docs.pnbr.io/troubleshooting/file-has-no-source-date.md) |
| Two Files hold two editions of one document | problem [two-editions-two-files](https://docs.pnbr.io/troubleshooting/two-editions-two-files.md) |
| Exit code 4, or `pending` | problem [change-waits-for-approval](https://docs.pnbr.io/troubleshooting/change-waits-for-approval.md) |

## Worth offering

* Offer to extract entities from the new collection with a Shape that fits the
  documents (recipe [extract-files](https://docs.pnbr.io/guides/extract-files.md)).
* Offer to share the collection with a client through a View (recipe
  [share-with-a-view](https://docs.pnbr.io/guides/share-with-a-view.md)).
* If two documents are editions of one document, offer to keep them as one File
  (problem [two-editions-two-files](https://docs.pnbr.io/troubleshooting/two-editions-two-files.md)).

## Report

Say how many documents arrived, the collection name, and each document's
source date. Name any document you did not add and why. Say whether every File
is searchable yet.

## Keep going

[File](https://docs.pnbr.io/concepts/file.md) · [Collection](https://docs.pnbr.io/concepts/collection.md) · [Search](https://docs.pnbr.io/concepts/search.md) · [Passage and citation](https://docs.pnbr.io/concepts/passage.md) · [Project](https://docs.pnbr.io/concepts/project.md) · [Answer from the project's documents, with citations](https://docs.pnbr.io/guides/answer-with-citations.md)

Penumbra Grammar 0.6.26


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.