KeyRoutines
StepFreefile.info

Get a file's size, dates and name parts in a routine

Get file info reads the details of one file or folder and hands them to the rest of your routine. It is handy when a later step needs the extension, the size or the date a file last changed.

How it works

  • You give it a single path to a file or folder.
  • It outputs the full path, name, the name without the extension, the extension, the folder it lives in, the size, whether it is a folder, and when it was created and last changed.
  • It only reads, so it never changes anything and behaves the same in a dry run as in a real one.

Routines that use it

Rename by date

Get file info on a new photo, then Rename file uses its modified date and Format date to give it a name like 2026-10-06 Holiday.

Warn about huge files

After a download, check the file's size with Compare values and show a banner when it is larger than you expected.

Branch on file type

Read the extension of a dropped file and use If to send PDFs to one folder and images to another with Move or copy file.

Settings

SettingWhat it does
PathThe file or folder.

Questions

How can I get the size of a file in an automation?
Add Get file info and point it at the file. Its size output can then be compared or shown by later steps.
Does it work on folders too?
Yes. It works on a folder as well as a file, and its outputs include whether the item is a folder.

Pairs well with

Build this routine in KeyRoutines

Free from the Microsoft Store for Windows 11 and 10. Pro is a one-time upgrade.