Ad Widget

Collapse

Check Number of File in a Directory (windows Server)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gianniiiii
    Junior Member
    • Aug 2009
    • 7

    #1

    Check Number of File in a Directory (windows Server)

    Hy,

    I apologize if there is allready a topic but i can't found it.
    I'am trying to monitor the number some file in a specific folder on a windows system.
    specificly i am trying to check if there are more or less than a specific number of file i this directory.

    thank you in advance

    Max
  • danrog
    Senior Member
    • Sep 2009
    • 164

    #2
    Try this:

    Code:
    dir /b | find /V /C ""
    You can then do something like this:

    If you have remote commands enabled:
    Code:
    zabbix_get -swindowsbox -ksystem.run["dir /B | find /V /C \"\""]
    or
    Code:
    UserParameter=vfs.dir.size[*],dir /B $1 | find /V /C ""

    Comment

    • gianniiiii
      Junior Member
      • Aug 2009
      • 7

      #3
      Originally posted by danrog
      Try this:

      Code:
      dir /b | find /V /C ""
      You can then do something like this:

      If you have remote commands enabled:
      Code:
      zabbix_get -swindowsbox -ksystem.run["dir /B | find /V /C \"\""]
      or
      Code:
      UserParameter=vfs.dir.size[*],dir /B $1 | find /V /C ""
      Hy danrog, do you mean in zabbix conf?

      Max

      Comment

      • gianniiiii
        Junior Member
        • Aug 2009
        • 7

        #4
        I find it!

        thank you very mutch it run very very very very well

        Comment

        Working...