Listing Imported Files with files

kent files lists the .FIT files recorded in a database, one row per file that was ever imported into it, in the order they were imported.

It is read-only, and never touches the .FIT files themselves. It reads only what the database recorded about them, so it works even when the originals are long gone.

Synopsis

kent files <dbfilename>

What it shows

$ kent files mydata.sqlite
Database:  mydata.sqlite

#  Imported              Created               Path
1  2026-08-12T09:14:03Z  2026-08-11T17:22:41Z  /home/user/rides/morning.fit  (Forerunner 965)
2  2026-08-14T20:41:55Z  2026-08-14T06:02:10Z  /home/user/rides/evening.fit
3  2026-08-15T11:00:00Z  -                     /home/user/rides/hike.fit
ColumnWhat it is
#The file's number in this database. Every activity, session, and record in the database points back at one of these, so it is also the number to quote when you want to identify a file. It is assigned in import order.
ImportedWhen Cordelia imported the file. Always present.
CreatedWhen the device itself wrote the file. Shown as - when the file didn't carry one. Not every device records it.
PathThe .FIT file it was imported from. This is where the file was at import time; it is not checked, and it may no longer be there.

A device name in parentheses after the path appears only when the file carried one. Most don't, and an empty pair of parentheses on every line would be noise.

Column widths follow the widest value actually present, so a database of short paths doesn't get a wide, mostly-blank column.

A database with no files

A database that has been created but never imported into prints a plain statement and succeeds. No files is an answer, not a failure, and the exit code is 0:

$ kent createdb mydata.sqlite
$ kent files mydata.sqlite
Database:  mydata.sqlite

No files recorded.
$ echo $?
0

In a script, that matters: test the exit code to find out whether Kent could read the database, not whether it found anything.

A path that does not exist is reported as missing and is not created:

$ kent files nope.sqlite
kent files: nope.sqlite does not exist
$ echo $?
1

An older database is refused

files refuses a database written by an older Cordelia than this build expects, the same way info and details do. It reads specific named columns, so an older database that never had them would otherwise fail with a raw SQLite error instead of an explanation.

kent sqldump and kent archive are the two commands that read such a database anyway. See Error Messages and Exit Codes.

What it is not

files lists the files that were imported. It does not list the activities inside them, and it does not show any of the recorded data. For counts of what a database holds, see kent info and kent details; to read the data itself, see kent archive or Viewing the Imported Data.

See also Error Messages and Exit Codes and Importing .FIT Files.

See also