Listing

The most basic file management function is the ability to list files of a specified type in a specified directory on a memory device of the instrument.

The listing command can be used to retrieve the list of files belonging to a certain file type, or located in a certain directory. In addition to the file name, the file size in bytes and the date of last modification is also displayed.

Requirements

  • GeoCOM capable instrument

Paths

The most general way of file listing is to not specify a file type (defaulting to unknown), and giving the directory path. Such a path should use / as separators (contrary to other Windows conventions) and might end with a /.

If a special type of file is to be listed (e.g. database), then it is enough to specify the file type, the path can be left out.

Note

On older instruments, the file listing might not return directories. In these cases the recursive file tree cannot be created.

Examples

Listing database files in internal memory
iman list files -f database COM1
Listing all exported files on a CF card
iman list files -d cf COM1 Data
Listing all contents of a directory recursively
iman list files --depth 0 COM1 Data

Usage

iman list files

List files on an instrument.

For each file in the specified directory (and discovered subdirectories when recursive search is enabled) the file name, file size and the time of last modification is displayed. Not empty directories and items, that are likely directories are show in blue and light blue colors. Known text formats are shown green. Image and drawing formats are shown in magenta. Database files are red. Other files are shown without special color.

This command requires a GeoCOM capable instrument, that supports file operations (TPS1200 and later).

iman list files [OPTIONS] PORT [DIRECTORY]

Options

-b, --baud <baud>

Serial speed

Options:

1200 | 2400 | 4800 | 9600 | 19200 | 38400 | 56000 | 57600 | 115200 | 230400 | 921600

-t, --timeout <timeout>

Serial timeout

-a, --attempts <attempts>

Number of connection attempts

--sync-after-timeout

Attempt to synchronize message que after a timeout

-d, --device <device>

Memory device

Options:

internal | cf | sd | usb | ram

-f, --filetype <filetype>

File type (all files are shown when not set)

Options:

image | database | overview-jpg | overview-bmp | telescope-jpg | telescope-bmp | scan | last

--depth <depth>

Recursive depth (0: unlimited; 1<=x: depth of directory search)

Arguments

PORT

Required argument

Serial port that the instrument is connected to (must be a valid identifier like COM1 or /dev/usbtty0)

DIRECTORY

Optional argument

Directory to list files in