I have been asked to calculate the number of Microsoft files (.docx etc) on all managed hosts. Is there a script I can run on the k1000 that will calculate this for me and transfer those results to a report. Thanks.
1 Comment   [ - ] Hide Comment


  • Thank you very much. I will give this a try on a test machine.
Please log in to comment

Answer this question or Comment on this question for clarity


This command should return a count of files ending in .docx:

dir/s c:\*.docx | find /c "docx"

You can test this by opening a command prompt as administrator and running it. It will take a long time to run as it is searching the entire hard drive. 

You can now create a custom inventory rule that using the ShellCommandTextReturn command with that command. Keep in mind that this will run every time your machines check in and will increase the time it takes for check ins to happen.

If you need to perform this same search on MacOS systems the command syntax would be different.

Answered 10/30/2014 by: chucksteel
Red Belt

Please log in to comment
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja