Skip to main content
Question

gentting filenames of empty excel files in a folder

  • August 13, 2026
  • 1 reply
  • 12 views

mortenaa
Contributor
Forum|alt.badge.img+3

Hi all

I have a FME job that reads XX amount of excel files from a folder using a Excel reader simply set to read “folder name\*.xls”

All of the excel files have different file names but with the exact same columns in the files themselves. its a whole bunch of log files. most of the files have many features but sometimes there are logs with no recorded features.

My FME job reads all the excel files and imports the contents into one table in a database and then another job moves the files that have contents that have been imported into a subfolder as a backup. 

But if a log file doesnt have any features and only contains the column names and no futher rows it is never read into FME which means i cant get the filenames to move the files into the subfolder.

I could use a directory and file pathnames reader to get the file names to move them but then i wouldnt have a way to know if they are really empty or if there is just some error in the column names or something else unforeseen.

Long question short, is there a way to test for empty excel files in a folder and get the file names?

1 reply

s.jager
Influencer
Forum|alt.badge.img+26
  • Influencer
  • August 13, 2026

I would use the Path Reader, then use a FeatureReader after that for every filename. You can configure that to add schema-attributes, or add the schema separately so you can validate for the columns names, and you can check which files didn’t give you any features. Make sure to expose fme_basename.