Kaseya Community

File whit extension exists

This question has suggested answer(s)

Hi!

We have Kaseya 6.5 installed and I'm trying to make procedure that check if a file whit extension .ahvd exist in a specific folder. I have tried whit testFileand testFileInDirectoryPath whit out any success, dose anyone have a good ide for this? I could solve this whit powershell in a couple of minutes but that dose not help since I wont Kaseya to take action if we fail.

All Replies
  • Hi ;

    Neither of those options will work because they were designed to look for a specific file and not files with specific extensions.

    I used the DIR and FINDSTR shell commands to search for files with the extension of *.AVHD* and filter it to so that it only shows lines with the following text before piping it out to a text file;

    Volume in drive

    File(s) Not Found...

    Directory of

    .avhd

    Dir(s)

    File(s)

    Total Files Listed:

    Once you have information in the text file you can do anything from alerting to reporting on it.