Looking for script to search all K1000 clients, all folders for any occurance of file named test.txt
If results are found what is the recommended method to collect results?

thank you!

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

3
I would create a Custom Inventory Rule
CommandShellTextReturn(cmd /c "dir /b /s /a:-D test.txt")
This will check for all occurences of test.txt on the local system and writes it to the inventory of the local system.
Then you can create a report to have these info.

It will update every time the system does a check in.
Answered 10/07/2014 by: Nico_K
Red Belt

  • Nico_K thank you for the response! I am testing your answer.
    I clicked Inventory, Software, Add new item.
    I gave the new software item a Display Name then selected the Supported OS's as all iterations of Win7.
    I entered your Custom Inventory Rule and saved.

    After reading the admin guide about Custom Inventory Rule I should now expect this rule to be passed to all Win7 clients?
    I expect I need to give this rule some time receive results since we are asking the entire client to be scanned for this file.
    I will respond later today with any results.
    thanks again
    • I don't have any results after several inventories of the test machines so let me give some more information.

      We had a virus that encrypted txt, docx, xlsx, and other files. In the folder where the newly encrypted file resides, the virus would also leave a file DECRYPT_INSTRUCTION.TXT.
      I believe the virus is gone and all is well but I would like to scan our workstations and see if any folders contain this DECRYPT_INSTRUCTION.TXT file left behind.

      After receiving the above possible Answer I created the Custom Inventory Rule but do not see any results in my Software Inventory count next to this rule. I have placed some dummy files on two PC's and inventoried them without results.

      I have done some FileExist custom intventory rules that work great but this CommandSHellTextReturn rule is not.
      Niko_K - When I look at my new Software entry in inventory I should see any results listed at the bottom by PC name, correct?
      thank you again
Please log in to comment
Answer this question or Comment on this question for clarity