What I basically want to do is to search all the variables, or specified variables, for a cirtant word, letter or number. I know this can be easily done with an SQL database file but I'm trying to keep everything in one file. So again, just like searching for information in a database I want to search variables for a word, and if they contain that word, I want the file to display the variable(s) that match the search parameters. I know it can be done but I can't find how to do it.
If, by "variables", you mean system (environment) or batch var.s, then:
set | find /i patternor:
set | findstr /i /G patternfileif you want to search text file or multiple files, use findstr (see: findstr /?)
set command will also wild card. for example if you were looking for a declared variable
hamster with a value of 500
and you used
set ham
it will display
hamster=500:: mike
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |