Page 1 of 1

new files - different color / marked?

Posted: 18 Mar 2022 13:37
by alxdvc
hi all
is there a way to have new files with a different color, or highlighter or marked, when they get placed in a given directory?
ideally with a timeframe, like, all new files names within the past xx hours, to be colored /underlined?
thank you
alex

Re: new files - different color / marked?

Posted: 18 Mar 2022 13:47
by highend
For files inside a folder? Don't know if this can be done by a (simple) colorfilter so use a custom column...

Don't forget to use "Icon" for the "Format" entry for the cc, otherwise you won't see anything^^
E.g.:

Code: Select all

// Create bars for files with different age(s)
      $created = property("#date.c", <cc_item>);
      $diff    = datediff($created, , "h"); // Difference in hours!
      if     ($diff <= 1)  { return '>draw.bar, 100, F6AB46, F6AB46'; } // Orange
      elseif ($diff <= 24) { return '>draw.bar, 100, E29CDC, E29CDC'; } // Purple

Re: new files - different color / marked?

Posted: 18 Mar 2022 14:22
by alxdvc
thank you highend, but how do I use that code that you suggested me? sorry I am not a developer, i'd need to know step by step how to create this filer for new files, nothing for granted, thank you :)

Re: new files - different color / marked?

Posted: 18 Mar 2022 14:23
by highend
It's in the help file, custom columns

Re: new files - different color / marked?

Posted: 20 Mar 2022 05:59
by jupe
A few of the default ICF Power Filters will shade colors by created time, (and can be used as a base to customize, eg hours only):

2022-03-20_155443.png

The help file unsurprisingly expands on how you can create these ICF entries yourself.