0

I tried this in CMD :

DIR /S DIRECTORY | FIND /I "FILENAME"  

; but this only shows whether the file is found or not ; the output does not contain the Path.

One way is to use EXPLORER , but I want to use CMD.

Another way is DIR /S | MORE, manually looking for the file. Yet another way is to get the full output of DIR /s and then search this text for filename, but these methods have too many issues like slowness or too much scrolling or too manual.

I am looking for a simple way to execute a built-in command and find the file with Path.

[[ While typing this question, I found a solution which I will add, for future visitors with the same question; but I would also be happy to see if others have a better solution ]]

0

It was surprisingly easy, but I was not aware of it till now:

DIR /S FILENAME DIRECTORY  

will search for FILENAME (even with wildcards) in DIRECTORY and show matching files with the PATH.
I would be happy to know if there are better solutions.

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.