Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • can this question be boiled down to "I have a list of strings in a text file and I need to test if %FQDN% matches any of them"?
    – rob
    Commented Sep 23, 2014 at 13:28
  • Take a look at FINDSTR (ss64.com/nt/findstr.html) Commented Sep 23, 2014 at 13:35
  • FOR /F Loop command: against the results of another command shows how to use "usebackq". If you edit your post to include your batch file I can take a look at how you can do this. Please also include a copy of list.txt (suitably censored if necessary)
    – DavidPostill
    Commented Sep 23, 2014 at 14:36
  • @rob no, i do not think that it can be boiled down as you suggested, as that is not what i am looking for. I have added the actual script and list of hostnames.
    – Fishy
    Commented Sep 29, 2014 at 5:37
  • @duDE i took a look at FINDSTR, but could not figure out how i would implement it into my main script.
    – Fishy
    Commented Sep 29, 2014 at 5:38