Analysis Properties in Relevance

(imported topic written by packman73)

I have written an analysis to return some values, now I need to write a fixlet to do some things depending on the results of the analysis. How do I reference the analysis results in the relevance?

(imported comment written by martinc)

You would not be able to access the analysis information, but you can use your relevance in the fixlet to check the same properties as your analysis.

Maybe you could provide some more detail on what you are trying to do so that a better answer can be given. :slight_smile:

(imported comment written by packman73)

I figured out the relevance.

exists
folder
"C:\ProgramData\KG\GrowPeople"

AND

exists
files
whose
(name
of

it

contains

“.log”
)
of
folder
"C:\ProgramData\KG\GrowPeople"
)
AND
(
exists
files
whose
(modification time
of

it

<
now

2
*
hour
AND
name
of

it

contains

“.log”
)
of
folder
"C:\ProgramData\KG\GrowPeople"
)

But now I can’t get the action script to work properly. I’m guessing my syntax is wrong somewhere here but can’t figure out what.

dos del {files whose (modification time of it < now - 2*hour AND name of it contains “.log”) of folder “C:\ProgramData\KG\GrowPeople”}

When I run this through the fixlet debugger it returns this. Where are all the " coming from?

STATUS: Running action…

Command started - dos del /Q C:\ProgramData\KG\GrowPeople"Log1 - Copy (12).log" “” “” “” “”“Log1 - Copy (2).log” “” “” “” “”“Log1 - Copy (3).log” “” “” “” “”“Log1 - Copy (4).log” “” “” “” “”“Log1 - Copy (5).log” “” “” “” “”“Log1 - Copy (6).log” “” “” “” “”“Log1 - Copy (7).log” “” “” “” “”“Log1 - Copy (8).log” “” “” “” “”“Log1 - Copy (9).log” “” “” “” “”“Log1.log” “” “” “” “”“Log1Copy.log” “” “” “” “”

— Result —

Evaluation completed successfully!

(imported comment written by jgstew)

You are missing “pathnames of”

The file inspector returns a file object, not the path of the file.

dos del { pathnames of files whose (modification time of it < now - 2*hour AND name of it contains “.log”) of folder “C:\ProgramData\KG\GrowPeople”}

(imported comment written by packman73)

So when I run just the relevance

(pathnames of files whose (modification time of it < now - 2*hour AND name of it contains “.log”) of folder “C:\ProgramData\KG\GrowPeople”)

Output is

C:\ProgramData\KG\GrowPeople\Log1 - Copy (3).log

C:\ProgramData\KG\GrowPeople\Log1 - Copy (4).log

C:\ProgramData\KG\GrowPeople\Log1 - Copy (5).log

C:\ProgramData\KG\GrowPeople\Log1 - Copy (6).log

C:\ProgramData\KG\GrowPeople\Log1 - Copy (7).log

C:\ProgramData\KG\GrowPeople\Log1 - Copy (8).log

C:\ProgramData\KG\GrowPeople\Log1 - Copy (9).log

C:\ProgramData\KG\GrowPeople\Log1.log

C:\ProgramData\KG\GrowPeople\Log1Copy.log

But when I actually want it to do something in the actionscript

dos del /Q {(pathnames of files whose (modification time of it < now - 2*hour AND name of it contains “.log”) of folder “C:\ProgramData\KG\GrowPeople”)}

This is the client log.

STATUS: Running action…

Command started - dos del /Q C:\ProgramData\KG\GrowPeople\Log1 - Copy (3).logC:\ProgramData\KG\GrowPeople\Log1 - Copy (4).logC:\ProgramData\KG\GrowPeople\Log1 - Copy (5).logC:\ProgramData\KG\GrowPeople\Log1 - Copy (6).logC:\ProgramData\KG\GrowPeople\Log1 - Copy (7).logC:\ProgramData\KG\GrowPeople\Log1 - Copy (8).logC:\ProgramData\KG\GrowPeople\Log1 - Copy (9).logC:\ProgramData\KG\GrowPeople\Log1.logC:\ProgramData\KG\GrowPeople\Log1Copy.log

— Result —

Evaluation completed successfully!

How do I get those individual results to run independently? So essentially what I want the script to do is.

For each {result of relevance}

dos del /q {result of relevance}

end

(imported comment written by jgstew)

("%22" & (concatenation “%22 %22” of (pathnames of files whose (modification time of it < now - 2*hour AND name of it contains “.log”) of folder “C:\ProgramData\KG\GrowPeople”)) & “%22”)

edited:

dos del /Q {
("%22" & (concatenation “%22 %22” of (pathnames of files whose (modification time of it < now - 2*hour AND name of it contains “.log”) of folder “C:\ProgramData\KG\GrowPeople”)) & “%22”)
}

(imported comment written by packman73)

That didn’t work either.

dos del /Q ("%22" & (concatenation “%22 %22” of (pathnames of files whose (modification time of it < now - 2*hour AND name of it contains “.log”) of folder “C:\ProgramData\KG\GrowPeople”)) & “%22”)

STATUS: Running action…

Command started - dos del /Q ("%22" & (concatenation “%22 %22” of (pathnames of files whose (modification time of it < now - 2*hour AND name of it contains “.log”) of folder “C:\ProgramData\KG\GrowPeople”)) & “%22”)

— Result —

Evaluation completed successfully!

(imported comment written by packman73)

Figured it out and it works now. I really wish I understood what was going on below with all the concatenation and such.

dos del /Q {"%22" & (concatenation “%22 %2C %22” of (pathnames of files whose (modification time of it < now - 2*hour AND name of it contains “.log”) of folder “C:\ProgramData\KG\GrowPeople”)) & “%22”}

(imported comment written by jgstew)

%22 is the % escape sequence for the double quote character.

I am basically adding a " at the beginning and a " at the end, and a " " inbetween each with the concat.

Relevance always has to be surrounded with {} in actionscript.

Did you test this in the Fixlet Debugger first? I find that useful before going to try it in the console.