I am running the windows command findstr to search for a specific sting only in .ini
files. The command I am running is findstr /i /s /m /C:\output *.ini
looking for the string \output
. The following is the output from the command
etc\billdirfile.ini
etc\doc1dirfile.ini
etc\ENVIRON.INI_20150902_0944
etc\ENVIRON.INI_20150903_1035
I expect a file etc\environ.ini
to show up in that list but it does not. When I rerun the command with an added wildcard at the end findstr /i /s /m /C:\output *.ini*
my out put is as follows.
etc\billdirfile.ini
etc\doc1dirfile.ini
etc\ENVIRON.INI
etc\ENVIRON.INI.bak
etc\ENVIRON.INI_20150901_1021
etc\ENVIRON.INI_20150901_1050
etc\ENVIRON.INI_20150901_1431
etc\ENVIRON.INI_20150901_1433
etc\ENVIRON.INI_20150901_1438
etc\ENVIRON.INI_20150902_0944
etc\ENVIRON.INI_20150902_0954
etc\ENVIRON.INI_20150903_1035
etc\ENVIRON.INI_20150903_1042
etc\ENVIRON.INI_20150903_1344
etc\ENVIRON.INI_20150922_1305
I have two questions based on this output.
1) Why without the additional wildcard i.e. *.ini
at the end does the environ.ini
file that I expect to see not show up ? I checked the name of the file there are no additional spaces or characters at the end.
2) why does these two files
etc\ENVIRON.INI_20150902_0944
etc\ENVIRON.INI_20150903_1035
show up without the added wildcard at the end i.e. without *.ini*
. I expect I would only see .ini
files only.
Also testing this on another machine
findstr /i /s /m /c:\output *.ini
etc\billdirfile.ini
etc\doc1dirfile.ini
etc\ENVIRON.INI
etc\ENVIRON.INI_20150825_1521
the findstr command finds the etc\environ.ini
file without an issue. Both machines are running server 2012 R2 and are exactly the same. Any help would be greatly appreciated.
Thanks,
Mack