UnRAR Switch to Skip Files Older Than a Date

When extracting archives with the UnRAR command-line utility, you can optimize your workflow by filtering out outdated files. This article explains the specific switch required to skip files older than a specified date, covers the proper date format, and demonstrates practical examples of using this parameter in your terminal.

The switch that allows UnRAR to skip files older than a specified date is -ta (Time After). When included in your extraction command, -ta instructs UnRAR to process only those files modified after the specified date and time, automatically ignoring any files older than that threshold.

Syntax and Date Format

The basic syntax for applying the filter is:

unrar x -ta<date> archive.rar

Note that there must be no space between the -ta switch and the date string.

The <date> argument uses the YYYYMMDDHHMMSS format (Year, Month, Day, Hour, Minute, Second). You do not need to provide all time parameters; any missing parts default to zero.

  • Full date and time: -ta20240501120000 (May 1, 2024, at 12:00:00)
  • Date only: -ta20240501 (May 1, 2024, at 00:00:00)

Practical Examples

To extract only files from backup.rar that were modified on or after January 1, 2024:

unrar x -ta20240101 backup.rar

To extract files to a specific directory while skipping anything modified before September 15, 2023, at 18:30:

unrar x -ta202309151830 backup.rar /path/to/destination/

Relative Time Alternative

If you prefer to filter based on a relative timeframe rather than an absolute calendar date, use the -tn (Time Newer) switch:

unrar x -tn15d backup.rar

This command skips all files older than 15 days relative to the current system time.