This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Query to check file contents

Hello,

I want to have a query to check for possible PII. There is the query to check for metadata such a password.docx or password.txt. Below is what I have so far and this works as long as you have the exact file path and pattern you are looking for. I tried to use % wildcards for path and %-, %%%-%%%-%%%% and even tried using grep syntax to look for socials in this example. Any help on how to get this to scan directories for files containing specific patterns either with a wildcard or another means. Thank you!

SELECT
*
FROM
grep
WHERE
path = '$$Location$$'
AND pattern = '$$Data$$'



This thread was automatically locked due to age.

Top Replies

  • one note - this is will be super slow. I wouldn't run this on more than one two machines at a time. Also, keep the target folders very constrained. Recursive iterations down the tree will cause performance problems. If you are too broad in score, the query will fail as it runs into the max time limit for query run. 

    Jump to answer
Parents Reply Children