sdaau
sdaau

Reputation: 38619

cmd.exe find files and directories with full path?

I just noticed, that looking up files like this in Windows cmd.exe:

C:\test>dir . /s | findstr /E "test.exe"
24-05-2016  18:11           262.656 test.exe
24-05-2016  18:11           262.656 test.exe

... does not provide the full path to the files, because it is not in the output of dir to begin with. In Unix, I could do:

find /c/test -name "test.exe"

... and I would get a list of absolute paths. How can I do the same in Windows Command Prompt cmd.exe?

Upvotes: 1

Views: 2006

Answers (1)

RepeatUntil
RepeatUntil

Reputation: 2320

To print full path use dir with /b

dir /S /b "test.exe"

Upvotes: 2

Related Questions