Hi - This seems like something that should be an easy task but it is not. I have a one line text file being generated by PowerShell. I am trying to check for the existence of a string within that file. I have the file content sensor setup, and it can see the file without any issues, however it refuses to find the string that is present.

When I enable debugging, the "results of sensor" output show the content of my target file, but with spaces inserted between every character. No idea why that's happening but I figured I'd try checking for the string with the spaces added, and that doesn't work either.

I've tried the different encoding options; either of the Unicode ones throw an error, so the Windows default seems like the only option. I'm not trying to use a regex. I'm literally just trying to check for one single word in a one line text file.

Any suggestions here?

Thanks!


Article Comments

Hello James,

Thank you very much for your contact.

To further analyse the issue, please write us an email to support@paessler.com and also provide us with the file, which will allow us to re-create the scenario here. Please remove private information if the file contains any.

Thank you very much in advance.
Sebastian


May, 2018 - Permalink