findstr ms-dos command won't search sub directories

前端 未结 2 1232
囚心锁ツ
囚心锁ツ 2021-02-20 16:43

I had to switch off my windows search indexing in Windows 7 as the old hard disk was constantly making noise with indexing switched on!

Now I want to use Windows

相关标签:
2条回答
  • 2021-02-20 16:50

    You need to put /S at the beginning, i.e.:

    findstr /S "thesis" *.tex
    

    From the built in help:

    C:\>findstr /?
    Searches for strings in files.
    
    FINDSTR [/B] [/E] [/L] [/R] [/S] [/I] [/X] [/V] [/N] [/M] [/O] [/P] [/F:file]
            [/C:string] [/G:file] [/D:dir list] [/A:color attributes] [/OFF[LINE]]
            strings [[drive:][path]filename[ ...]]
    

    Your modifiers/switches, whatever they are called, need to come before your pattern/string

    0 讨论(0)
  • 2021-02-20 16:56

    You have your arguments in the wrong order, try this:

    findstr /S "thesis" *.tex
    
    0 讨论(0)
提交回复
热议问题