Recently created files

(imported topic written by Shawn_Jefferson)

Hi,

I’m trying to get a report on computers that have recently created files in the system directory with Bigfix. I was doing this, but it always returns false:

exists files whose (creation time of it > “10/30/2007” as time) of system folder

what am I doing wrong here?

Thanks.

(imported comment written by Shawn_Jefferson)

Thanks!

(imported comment written by mynameisbear91)

Shawn Jefferson

Hi,

I’m trying to get a report on computers that have recently created files in the system directory with Bigfix. I was doing this, but it always returns false:

exists files whose (creation time of it > “10/30/2007” as time) of system folder

what am I doing wrong here?

Thanks.

I think you’re comparing apples to oranges.

The creation time object is not formatted like that:

q: creation time of system folder
A: Thu, 02 Nov 2006 05:18:36 -0600

Here’s one that should be true (files in there from after the creation time of the system folder):

q: exists files whose (creation time of it > “Thu, 02 Nov 2006 05:18:36 -0600” as time) of system folder
A: True

Here’s the same one with the year moved up to next year (so it’ll be false):

q: exists files whose (creation time of it > “Thu, 02 Nov 2008 05:18:36 -0600” as time) of system folder
A: False

Conrad

p.s. I deleted my earlier post 'cause I posted it then thought I made a mistake, turns out I was wrong (and my examples are right!)

(imported comment written by mynameisbear91)

And if you want to be a real ninja…

exists files whose (creation time of it > (((current date -14*day) as string & " " & (current time_of_day) as string)) as time ) of system folder

… finds systems with files with a creation time within the last 14 days.

There might be a better way, but this was off the top of my head.

(imported comment written by BenKus)

Hey cgolightly,

That relevance looks correct and there isn’t anything wrong with it… but it is probably easier to re-write it like this:

exists files whose (creation time of it > now - 14*day) of system folder

Just a note…

Ben

(imported comment written by mynameisbear91)

Ben Kus

Hey cgolightly,

That relevance looks correct and there isn’t anything wrong with it… but it is probably easier to re-write it like this:
exists files whose (creation time of it > now - 14*day) of system folder

Just a note…

Ben

LOL I forgot about “now”