Ad Widget

Collapse

DATE macro for $TODAY - x-days

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • msc
    Junior Member
    • Dec 2017
    • 2

    #1

    DATE macro for $TODAY - x-days

    I have cases where I need to check if a files exists and sometimes I want to put further actions on that.

    Until today I solved it using the system.run command, because it allows to build the file name like this: '*`date "+%Y-%m-%d" -d "31 days ago"`.

    But instead of using the system.run command, I would prefer to use the vfs.file.exists command, combined with a trigger action. Trying that, I found that when I try to build the date part of the filename within the vfs.file.exists command like:

    vfs.file.exists[my_file_`date "+%Y-%m-%d" -d "31 days ago"`]

    then the date command is not executed and thus note replaced with the date.

    Does anybody have an idea how this can be solved?

Working...