New to BigFix

(imported topic written by SystemAdmin)

Hello all,

I’m pretty new to creating Fixlets and this may have been answered in another thread but I can’t find a good way of searching for it. So here is my dilemma, I want to read the last modified time of a file on multiple servers. Most of them in are in the same path on each server but there are one or two that have a different path. How can I get the Fixlet to check one place and if it doesn’t find it, move to the next folder and check there before sending an error flag? It’s probably a simple “if (file a) doesn’t exist then check (file b) path”.

(imported comment written by jgolembi)

jimwald,

This is what I have used:

if (exists file("c:\xmlexample.txt")) then modification time of file("c:\xmlexample.txt") as string else if (exists file("c:\setup\xmlexample.txt")) then modification time of file("c:\setup\xmlexample.txt") as string else "N/A"

-John G

(imported comment written by jgolembi)

jimwald,

This is what I have used:

if (exists file("c:\xmlexample.txt")) then modification time of file("c:\xmlexample.txt") as string else if (exists file("c:\setup\xmlexample.txt")) then modification time of file("c:\setup\xmlexample.txt") as string else "N/A"

-John G

(imported comment written by SystemAdmin)

Not trying to step on your feet jgolembi, I just really like writing Relevance. Here is another possible solution jim:

modification times of files whose ( name of it = "test.txt" ) of ( folders "C:\temp\c"; folders "C:\temp\a"; folders "c:\temp\b" )

There are plenty of other ways to go about this and you can refer to the numerous guides at: https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/Tivoli%20Endpoint%20Manager/page/Fixlet%20Authoring for looking stuff up.

Also, Relevance itself has introspection which I find very useful.

properties of type whose ( name of it contains "file" )

To get an even more verbose search:

properties whose ( it as string contains "file" )

This will show you any inspector or result type that contains “file”.

(imported comment written by jgolembi)

Benhobbs,

My feet will be fine!

However by posting this you are now my Forum arch-nemesis. You are

KAHHHHHN!

I am Kirk.

:slight_smile:

-John G