civex files
Reach stored files by name and folder, the way the records are arranged
| Command | Description |
|---|---|
download |
Write the selection as one file: a zip of the files and their tables, or, when it is a single table and nothing else, that table. |
export |
Build a folder of the files, named and arranged by their records. |
exports |
See and clean up the folders civex files export made |
fetch |
Download these files from the server, where they are only there. |
free |
Free space: remove this computer's copies of these files. |
gather |
Move just these files onto one drive. |
list |
List the files of some records by the path they would have as folders. |
civex files download
Write the selection as one file: a zip of the files and their tables, or, when it is a single table and nothing else, that table.
The same paths and tables as civex files export, for taking elsewhere.
Usage
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
OUTPUT |
path |
yes | Where to write it: a .zip, or the table's own file |
Options
| Option | Type | Default | Description |
|---|---|---|---|
--in, -c |
str |
Only this collection | |
--schema, -s |
str |
Only records of this schema | |
--under, -u |
str |
A record (id or prefix): its files and those of everything beneath it. Paths start below it. With --schema, only that schema's records. | |
--field, -f |
str |
Only this file field (repeat for several) | |
--where, -w |
str |
Filter: field=value (repeatable) | |
--search |
str |
Text to find in the records' values | |
--view |
str |
A saved view, as schema/view: its filter, its file columns and its layout (--in/--under still narrow it). | |
--export, -e |
str |
An export saved with a schema, as schema/name (see civex schema exports): its kind, file fields, filter and layout. Run it in a collection (--in) and/or within a record (--under). |
|
--layout |
str |
tree: a folder per record above each file (default); grouped: the folders above, but the records holding the files gathered into one folder named for their kind (Encounter/Recording/Selections); flat: every file in one folder. One of: tree, grouped, flat. | |
--table, -t |
str |
Also make a table of the records, one per kind of record, named for the kind (Selections.csv). One of: csv, tsv, xlsx, json, jsonl. | |
--column, -C |
str |
A column of the table (repeat for several, in order): a field, a ref_field.target_field join, or id/schema/created_at/updated_at. Default: the id and every field. | |
--no-files |
flag | false |
Make the table alone, without the files. |
--allow-partial |
flag | false |
Go ahead without the files that can't be reached (MISSING.txt lists them) |
civex files export
Build a folder of the files, named and arranged by their records.
With --table FORMAT the folder also holds a table of those records (one per kind, named for it: Selections.csv, or .tsv .xlsx .json .jsonl), whose file columns say where each file is in the folder; --column picks its columns and --no-files makes the table alone.
Prints what can't be reached first. If anything can't (a drive that isn't
connected) nothing is made unless you agree, or pass --allow-partial.
With --mode link, files spread over more than one drive can't be gathered
into one linked folder; use --mode copy --to civex files exports
remove.
Usage
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
DEST |
path |
no | Advanced: a folder to build in (empty, or an earlier export). Leave out to use civex's own exports folder, which civex files exports can list and clean up. |
Options
| Option | Type | Default | Description |
|---|---|---|---|
--in, -c |
str |
Only this collection | |
--schema, -s |
str |
Only records of this schema | |
--under, -u |
str |
A record (id or prefix): its files and those of everything beneath it. Paths start below it. With --schema, only that schema's records. | |
--field, -f |
str |
Only this file field (repeat for several) | |
--where, -w |
str |
Filter: field=value (repeatable) | |
--search |
str |
Text to find in the records' values | |
--view |
str |
A saved view, as schema/view: its filter, its file columns and its layout (--in/--under still narrow it). | |
--export, -e |
str |
An export saved with a schema, as schema/name (see civex schema exports): its kind, file fields, filter and layout. Run it in a collection (--in) and/or within a record (--under). |
|
--layout |
str |
tree: a folder per record above each file (default); grouped: the folders above, but the records holding the files gathered into one folder named for their kind (Encounter/Recording/Selections); flat: every file in one folder. One of: tree, grouped, flat. | |
--table, -t |
str |
Also make a table of the records, one per kind of record, named for the kind (Selections.csv). One of: csv, tsv, xlsx, json, jsonl. | |
--column, -C |
str |
A column of the table (repeat for several, in order): a field, a ref_field.target_field join, or id/schema/created_at/updated_at. Default: the id and every field. | |
--no-files |
flag | false |
Make the table alone, without the files. |
--mode |
str |
link |
link: hard links in a folder on the drive that holds the files, so nothing is copied (refused if the files are on several drives); copy: real copies on one drive (--to). A link is the stored file itself, so don't edit it in place. |
--to |
str |
With --mode copy: the drive (volume name) to copy onto. Default: the project folder. | |
--name |
str |
Name of the export folder (default: from the selection) | |
--allow-partial |
flag | false |
Go ahead without the files that can't be reached (they are listed in MISSING.txt) |
civex files exports
See and clean up the folders civex files export made
Usage
civex files fetch
Download these files from the server, where they are only there.
For a project that follows a server: the selected files another device added are brought to this computer, onto their collection's drive.
Usage
Options
| Option | Type | Default | Description |
|---|---|---|---|
--in, -c |
str |
Only this collection | |
--schema, -s |
str |
Only records of this schema | |
--under, -u |
str |
A record (id or prefix): its files and those of everything beneath it. Paths start below it. With --schema, only that schema's records. | |
--field, -f |
str |
Only this file field (repeat for several) | |
--where, -w |
str |
Filter: field=value (repeatable) | |
--search |
str |
Text to find in the records' values | |
--view |
str |
A saved view, as schema/view: its filter, its file columns and its layout (--in/--under still narrow it). | |
--name |
str |
Only files whose name, or whose record's name, has this |
civex files free
Free space: remove this computer's copies of these files.
Each comes back when opened or exported. Only files the server confirms it
holds are removed, and never one a collection kept on this computer uses
(civex sync keep <collection> --opened first). Counts and asks before
removing anything.
Usage
Options
| Option | Type | Default | Description |
|---|---|---|---|
--in, -c |
str |
Only this collection | |
--schema, -s |
str |
Only records of this schema | |
--under, -u |
str |
A record (id or prefix): its files and those of everything beneath it. Paths start below it. With --schema, only that schema's records. | |
--field, -f |
str |
Only this file field (repeat for several) | |
--where, -w |
str |
Filter: field=value (repeatable) | |
--search |
str |
Text to find in the records' values | |
--view |
str |
A saved view, as schema/view: its filter, its file columns and its layout (--in/--under still narrow it). | |
--on |
str |
Only files in this place: a drive's name, 'server' (only on the server), 'missing', 'here' (on a drive that can be read now) or 'unreachable' | |
--name |
str |
Only files whose name, or whose record's name, has this | |
--yes, -y |
flag | false |
Don't ask first. |
civex files gather
Move just these files onto one drive.
Only the files you select move, not the rest of their collections; pick
them by records (the usual options), by place (--on: e.g. everything still
on the field SSD) and by name. Files only on the server are downloaded
first. It is an ordinary move (checked before the original is removed, safe
to stop at any moment, queued behind any other). Use civex files list
with the same options first to see what you are selecting.
Usage
Options
| Option | Type | Default | Description |
|---|---|---|---|
--to |
str |
The drive (volume name) to gather the files onto (required) | |
--in, -c |
str |
Only this collection | |
--schema, -s |
str |
Only records of this schema | |
--under, -u |
str |
A record (id or prefix): its files and those of everything beneath it. Paths start below it. With --schema, only that schema's records. | |
--field, -f |
str |
Only this file field (repeat for several) | |
--where, -w |
str |
Filter: field=value (repeatable) | |
--search |
str |
Text to find in the records' values | |
--view |
str |
A saved view, as schema/view: its filter, its file columns and its layout (--in/--under still narrow it). | |
--export, -e |
str |
An export saved with a schema, as schema/name (see civex schema exports): its kind, file fields, filter and layout. Run it in a collection (--in) and/or within a record (--under). |
|
--on |
str |
Only files in this place: a drive's name, 'server' (only on the server), 'missing', 'here' (on a drive that can be read now) or 'unreachable' | |
--name |
str |
Only files whose name, or whose record's name, has this | |
--include-shared |
flag | false |
Also move files that other records use (they move for them too). By default those stay where they are. |
--dry-run |
flag | false |
Show what would move and stop. |
civex files list
List the files of some records by the path they would have as folders.
Shows what can be reached now. A file on a drive that isn't connected is listed with the drive's name instead of a path.
Usage
Options
| Option | Type | Default | Description |
|---|---|---|---|
--in, -c |
str |
Only this collection | |
--schema, -s |
str |
Only records of this schema | |
--under, -u |
str |
A record (id or prefix): its files and those of everything beneath it. Paths start below it. With --schema, only that schema's records. | |
--field, -f |
str |
Only this file field (repeat for several) | |
--where, -w |
str |
Filter: field=value (repeatable) | |
--search |
str |
Text to find in the records' values | |
--view |
str |
A saved view, as schema/view: its filter, its file columns and its layout (--in/--under still narrow it). | |
--export, -e |
str |
An export saved with a schema, as schema/name (see civex schema exports): its kind, file fields, filter and layout. Run it in a collection (--in) and/or within a record (--under). |
|
--layout |
str |
tree: a folder per record above each file (default); grouped: the folders above, but the records holding the files gathered into one folder named for their kind (Encounter/Recording/Selections); flat: every file in one folder. One of: tree, grouped, flat. | |
--on |
str |
Only files in this place: a drive's name, 'server' (only on the server), 'missing', 'here' (on a drive that can be read now) or 'unreachable' | |
--name |
str |
Only files whose name, or whose record's name, has this | |
--paths |
flag | false |
Print where each reachable file is on disk, one per line, for scripts |