Skip to main content

Filez4Eva

⚠️ DISCLAIMER: This is a hobby/personal project. Not a commercial product. Not for production use.

Shift scans, photos, and other files into structured folders for permanent safekeeping

Filez4Eva is a command-line tool that helps you organize files by naming them correctly and placing them in the right directory structure. It's especially useful for managing account documents, scanned files, and other personal records.

Installation

It's best to install using pipx:

pipx install filez4eva

If you don't have pipx installed, visit the pipx site for installation instructions.

Usage

Stowing Individual Files

To organize a single file (like a downloaded PDF):

filez4eva stow-file ~/Desktop/123456789SomeFileIDownloaded.pdf

Filez4Eva will interactively prompt for:

  • Cabinet, only if several are configured (with tab-completion of cabinet names; see Cabinets)
  • Date in YYYYMMDD format
  • Account name (with tab-completion from existing accounts)
  • Part name (with tab-completion from existing files for that account)

Values can also be piped in as a YAML mapping on stdin, which is handy for other tools that produce a record for the file:

printf 'date: 20240213\naccount: acct\npart: statement\n' \
  | filez4eva stow-file ~/Desktop/statement.pdf
  • Recognised keys are cabinet, date, account and part; any other keys are ignored.
  • Command-line flags override values from stdin.
  • Anything still missing is prompted for as usual.
  • date may be 20240213, '20240213' or 2024-02-13. If it isn't a valid date, stow-file exits with an error.
  • If stdin is empty, isn't valid YAML, or isn't a mapping, it is ignored.
  • Values are read as plain text, so 0123 stays 0123 and yes stays yes.
  • ~ and null are treated as missing, so that value is prompted for.
  • Stdin is only read by stow-file itself. scan-dir ignores it.

However the values are supplied (flags, stdin or prompts), account must be a single directory name (not empty, . or .., and without / or \), and part may contain only letters, digits and hyphens. An invalid value from a flag or stdin makes stow-file exit with an error. An invalid value typed at a prompt is rejected and the prompt asks again.

Processing Multiple Files

To process all files in a directory:

filez4eva scan-dir ~/Desktop

This interactive process lets you:

  • Skip a file (x)
  • Preview a file (p)
  • Stow a file (s)
  • Delete a file (d)
  • Quit processing (q)

Command Line Options

Global options:

  • --config PATH: Specify path to config file
  • --debug: Enable debug output

stow-file command:

  • --cabinet, -c NAME: Specify the cabinet (destination) to stow into
  • --date, -d DATE: Specify date in YYYYMMDD format
  • --account, -a ACCOUNT: Specify account name
  • --part, -p PART: Specify part name
  • file: Path to the file to stow

After a successful move, stow-file prints the absolute destination path on stdout (the Done status goes to stderr), so scripts can capture it, e.g. dest=$(filez4eva stow-file -d 20240213 -a acct -p part file.pdf).

scan-dir command:

  • dir: Optional path to directory to scan (defaults to configured source)

Configuration

Create a filez4eva.yml file with:

filez4eva:
  source: '~/Desktop'          # Default source directory
  target: '~/Dropbox/accounts' # Target directory for stowed files

Files will be organized in this pattern:

~/Dropbox/accounts/<year>/<account>/<date>-<part>.<extension>

Destination pattern

The layout under target can be changed with the optional pattern key:

filez4eva:
  target: '~/Dropbox/accounts'
  pattern: '{account}/{year}/{part}-{date}{ext}'

The default is '{year}/{account}/{date}-{part}{ext}', which gives the layout shown above. Quote the pattern in YAML, since it starts with {.

Placeholders:

  • {year}: four-digit year, e.g. 2024
  • {date}: date as YYYYMMDD, e.g. 20240213
  • {account}: account name
  • {part}: part name
  • {ext}: the source file's extension, including the dot (e.g. .pdf), or nothing if the file has no extension

Use / to create subdirectories; missing directories are created. Any other text is used literally. A pattern is a configuration error, and stow-file exits before moving anything or prompting, if it:

  • uses a placeholder not listed above, or a positional one like {} or {0}
  • uses format specs, conversions, attributes or indexes (e.g. {year:>4}, {account!r}, {year.x}, {account[0]})
  • has unbalanced braces
  • is absolute, starts with ~, or contains ..

Tab completion of accounts and parts reads existing files in the default layout, so it only works with the default pattern. With any other pattern the prompts still accept typed values but offer no completion.

Cabinets

To file into more than one destination, configure named cabinets:

filez4eva:
  cabinets:
    accounts:
      target: ~/Dropbox/accounts
      pattern: '{year}/{account}/{date}-{part}{ext}'
      description: Personal account records
    memories:
      target: ~/Dropbox/memories
      pattern: '{account}/{year}/{part}-{date}{ext}'

Each cabinet has:

  • target (required): the directory files are stowed under
  • pattern (optional): the layout under the target, as described above. Defaults to the top-level pattern if set, otherwise '{year}/{account}/{date}-{part}{ext}'
  • description (optional): a note on what the cabinet holds

Choose the cabinet with --cabinet NAME (or -c NAME), or with a cabinet key on stdin; the flag wins if both are given. If neither is given and there is more than one cabinet, stow-file prompts for one, with tab-completion of the names. With only one cabinet it is used without asking. An unknown name from the flag or stdin is an error; an unknown name typed at the prompt is rejected and the prompt asks again. scan-dir asks for a cabinet for each file it stows.

Tab completion of accounts and parts reads the chosen cabinet's target.

If there is no cabinets section (or it is empty), the top-level target and pattern form a single cabinet named default, so existing configurations work unchanged. If cabinets is present, the top-level target is ignored.

The whole configuration is checked before any prompt: a cabinet with no target, or with an invalid pattern, is an error even if it isn't the one being used.

Metadata

Release files for filez4eva 5.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for filez4eva 5.0.0
File Size Uploaded
filez4eva-5.0.0.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for filez4eva 5.0.0
File Interpreter ABI Platform
filez4eva-5.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.3 kB

Release files / filez4eva-5.0.0.tar.gz

Download URL filez4eva-5.0.0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
44ed520d6ff424b4dac743a834b308b8f19ce647ef5dd8ef8c5c680f89b7f2ae
BLAKE2b-256 checksum
How to use checksums
c1bd5fc77d01f7c140ce027dca7b7e31e866f62006e126768b3fba56b2323188
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release files / filez4eva-5.0.0-py3-none-any.whl

Download URL filez4eva-5.0.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d51cd25a6c23a5d254394168662adb0d130187bf85ab5d1151231b7e55d87d6
BLAKE2b-256 checksum
How to use checksums
cc93a4b9d62f93ccf48905902d72a886403d03d141676d06b0f8acd94524a4e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release history Release notifications | RSS feed

5.2.0

2 release files

5.1.1

2 release files

5.1.0

2 release files

This release

5.0.0 This release

2 release files

4.0.0

2 release files

3.0.13

2 release files

3.0.12

2 release files

3.0.11

2 release files

3.0.10

2 release files

3.0.9

2 release files

3.0.7

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.2.8

2 release files

2.2.7

2 release files

2.2.6

2 release files

2.2.5

2 release files

2.2.4

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page