# File

Specifies the absolute file path to monitor; wildcards are allowed.

This parameter applies to imfile: Text File Input Module.

Name:

  File

Scope:

  input

Type:

  string (see Rsyslog Parameter String Constants)

Default:

  none

Required?:

  yes

Introduced:

  at least 5.x, possibly earlier

## Description

The file being monitored. It must be an absolute path without macros or templates. Wildcards are supported at the file name level. See WildCards in the module documentation for details.

## Input usage

    input(type="imfile"
          File="/path/to/logfile"
          Tag="example")

### Legacy names (for reference)

Historic names/directives for compatibility. Do not use in new configs.

- `$InputFileName` — maps to File (status: legacy)

## See also

See also imfile: Text File Input Module.

Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project

Contributing: Source & docs: rsyslog source project

© 2008–2025 Rainer Gerhards and others. Licensed under the Apache License 2.0.