Ad Widget

Collapse

UserParameter to count files in Windows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • frater
    Senior Member
    • Oct 2010
    • 340

    #1

    UserParameter to count files in Windows

    Windows isn't that "script based", so what's pretty straightforward in Linux is quite difficult in Windows. Especially if you don't want to install CLI-programs.

    I needed to know how many logfiles were made by the Exchange Server for their database. They have a "log extension" but they are in fact transaction files.

    I made this UserParameter that can be put to use in many other cases:


    Code:
    UserParameter=vfs.files.countsuffix[*], dir "$2\*.$1" 2>null | find /c /i ".$1"
    This is how I put it to use:
    Code:
    vfs.files.countsuffix[log, "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database"]
    Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP
Working...