- Oct
- 364
- 17
I realize this can be done with a custom routine. I'm wondering if there is a single function to do this (or command that sets a variable):
We download multiple date-named files with the name format XYZ_DEN_yyyymmdd.txt, e.g., XYZ_DEN_20191222.txt. There is one file per day, so on Mondays that would normally be 3 files.
Those files usually are empty, i.e., zero-length, but sometimes not. Today there is one length 385 and two length 0.
We also get files (with a different name pattern) that sometimes only contain a header, one header is length 566 and the other is length 662.
I'm wondering if there is a function that basically returns the following:
1) In a folder or set of subfolders
2) Look for all filenames matching a specific pattern
3a) Return the number of matching files that are a specific length
-or-
3b) the number of matching files that are not that specific length.
We download multiple date-named files with the name format XYZ_DEN_yyyymmdd.txt, e.g., XYZ_DEN_20191222.txt. There is one file per day, so on Mondays that would normally be 3 files.
Those files usually are empty, i.e., zero-length, but sometimes not. Today there is one length 385 and two length 0.
We also get files (with a different name pattern) that sometimes only contain a header, one header is length 566 and the other is length 662.
I'm wondering if there is a function that basically returns the following:
1) In a folder or set of subfolders
2) Look for all filenames matching a specific pattern
3a) Return the number of matching files that are a specific length
-or-
3b) the number of matching files that are not that specific length.