searching for a file:
by type:
dir *.c /S

by name:
dir “file name”* /S

by full name:
dir “file name.txt” /s

search in specyfied dir:
dir /s /b d:\some folder\*.cpp
dir /s /b d:\some folder\test.*

Notes:
– /s is for recurse subdirectories search
– /b flag will omit detailed file informations and just list full filenames

more: https://isc.sans.edu/diary/Finding+Files+and+Counting+Lines+at+the+Windows+Command+Prompt/2244

Leave a Reply

Your email address will not be published. Required fields are marked *