1

I have a hard drive containing really unorganized folders of movie files. Now I want to use the dir cmd command to search for the following: - a filename, containing both the strings 'holiday' and '2017', in no particular order, and the file extension must match any of the following: .mov .mp4 .avi

Note that the strings 'holiday' and '2017' are not necessarily next to each other, there can be other words in between.

How to achieve this? I played around with dir /s combined with findstr but no success

1

How to achieve this? I played around with dir /s combined with findstr but no success

You need to use findstr twice, together with dir /b /s, something like the following (not tested):

dir /b /s *.mov *.mp4 *.avi | findstr /i "holiday" | findstr "2017"

Further Reading

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.