Ad Widget

Collapse

File Age with date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • osmoonlight
    Junior Member
    • Jul 2022
    • 9

    #1

    File Age with date

    Hello, for somebody who knows what they are doing this should be an easy question.

    I want to monitor the modify date for an update file using vfs.file.time. The file is "D:\path\update - Full.BDF.7z.2022-08-15T12-36-43Z".

    What is the correct syntax, taking into account that everything after 7z. changes when the new file is downloaded? vfs.file.time[D:\path\????, modify]

    Thanks a bunch.
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    Unfortunately, this key does not support regex expressions when specifying the file name.
    But you can use a workaround: Userparameter (or system.run) + "powershell -c (Get-Date -Date (Get-Item D:\path\update-Full.BDF.7z.*).LastWriteTime.ToUniversalTime() -UFormat %s)"

    Comment

    Working...