A little announcement. A lot to explore.

Happy learning!

Explore lessons, including SAS & R programs and practice data.

Search lessons

Type at least 3 characters to see matching lessons.

Open SAS ↗Open R ↗
← SASnRList Files with Metadata: Size, Created and Modified Time

Introduction

  • The previous lesson (8100) listed files by name; this one adds the metadata columns we usually want alongside the name: size, creation time, modification time.
  • Typical uses: spot stale files that have not been updated in weeks, flag unexpectedly large outputs, audit the folder for completeness.
  • SAS needs a nested open — fopen on each file produced by dopen/dread — and reads metadata with fsize() and finfo().
  • Tidyverse uses the fs package: dir_ls() for the path list and file_info() for the metadata in one tidy call.
  • Base R uses list.files() + file.info(); no extra package required.
  • This lesson produces a file-list data frame with size, modified time, and created time per file.

List Files with Metadata: Size, Created and Modified Time