Analyses/Relevance on randomly generated file names

Hello, I’m pretty new to BigFix and I’ve got a question.
I’m trying to make a analyses/relevance based on a file size of a file that’s created from a scanner, that makes a file named (scan type)(computer name)(date ran).ext and return if its greater then 0KB

The location and extension are always the same, just the file name changes. I’ve figured out how to pull the file names (name of find file “*.ext” of folder “C:\Location” as string) But I can’t seem to do anything with it after that.

Is what I want to do even possible?

What do we want to do after we find that the file exists, just return the name?
Here are a few example statements to get you started.

The pipe “!” character is like an else statement. If the folder is not there, we don’t get an error.

name of find files "*.ext" whose (size of it > 0) of folder "C:\Location\" | "None found"

This one is useful because we a True/False Boolean and we can use it to make decisions.

exists find files "*.ext" whose (size of it > 0) of folder "C:\Location\" | false

For example, we can use the If/Then/Else statement like this:

if () then () else ()
if (exists find files "*.ext" whose (size of it > 0) of folder "C:\Location\" | false) then ("Found") else ("Not Found")


2 Likes

Thanks!! That helps me a ton!
As to what we want to do with it after we find it, I’ve actually a few things that I will want to do, but I couldn’t get past the changing file name, thanks so much for the help!

If the files you are looking for are all in that folder and not in subfolders, then this is what I would recommend:

(name of it, size of it) of files whose(size of it > 0 AND name of it as lowercase ends with ".ext") of folders "C:\Location\"

The files above will return a set of file objects that meet your criteria that you can get many different properties from.