3

I'm hoping for the Windows Explorer equivalent to Linux's find . type -f.

I did *.* in the search field but it listed directories as well; I wanted just files.

Everything I've found on the subject is talking about finding specific file types, I just want files in general. That is, I want the resulting search listing to consist solely of files of any and all types, no directories/folders.

1
  • is a command feasible? or must it be GUI?
    – phuclv
    Jun 12, 2017 at 3:26

2 Answers 2

5

I want the resulting search listing to consist solely of files

Use *.* NOT kind:folder

Notes:

  • NOT must be spelled with capital letters.

  • Using a filter such as .** or .? as specified in another answer doesn't work if the location isn't indexed.

Examples

No filter:

enter image description here

*.* NOT kind:folder filter:

enter image description here


Further Reading

2
  • Per your "Advanced Query Syntax" URL you can make use of boolean operators, so how about *.* NOT kind:folder? Essentially the same thing except it excludes folders. Seems to work for me on Windows 10.
    – BrianC
    May 16, 2017 at 2:05
  • @BrianC Yes, that works. Well spotted. I tried before with not not realising it had to be NOT :/ Answer updated.
    – DavidPostill
    May 16, 2017 at 7:43
0

Short Answer: Use .** or .?


I figured this out by randomly trying things :). Just type in .**, and voila!

Edit #1: I just found out that .? works too

explorer I'm not really sure why this works, so if anyone figures it out please edit :)

Edit #2: I think it has something to do with how * matches tons of symbols, and ? just matches one letter or symbol. But, I'm surprised that .** matches test.c since it only has one character in the path.

"the question mark is used to substitute for one letter or symbol that you don't know. The asterisk is used to substitute for many letters and symbols" (http://www.digitalcitizen.life/basics-making-advanced-searches-wildcards-and-filters)

I'm not really 100% sure why it works, so it might have some unexpected results. But, so far both work for all the files I have tested, including ones with a single character as an extension (test.c)

7
  • .** and .? don't work if the location being search is not indexed.
    – DavidPostill
    May 15, 2017 at 23:49
  • @DavidPostill It works for me, and I didn't need to index. May 16, 2017 at 0:03
  • Hmm. Maybe that's a Windows 7 thing.
    – DavidPostill
    May 16, 2017 at 0:04
  • @DavidPostill Probably just an issue with the horrible Windows XP search xD May 16, 2017 at 0:06
  • ? matches one char. Asterisk matches zero or more chars.
    – ddbug
    May 16, 2017 at 1:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .