Windows search folders only one level

4

3

I have, in a Windows 10 machine, about 600 projects folder, and each of these folders have two folders: current and old_releases. All projects together have about 1TB.

To free space on the server, I want to delete all old_releases folder. So I thought I could quickly find them with the Windows Explorer search tool, since all folders are on the first level, and just hit shift+delete key. However, unfortunately, the searcher does not starts to look automatically through the first level, and takes a really long time to find all folders I want to remove.

I wonder if there is a way to limit the Windows explorer search for one level deep (I already limited to look just for folders ). Is it possible?

If not, I would accept any suggestion to achieve my goal (delete those folders) easily...

Leonardo Alves Machado

Posted 2018-08-17T17:56:53.467

Reputation: 246

Answers

1

Try this...

old_releases  kind:=folder -folderpath:x\*\ 

Note: Replace 'x' with your main folder name.

Example...

old_releases  kind:=folder -folderpath:AllProjects\*\ 

Screenshot

DxTx

Posted 2018-08-17T17:56:53.467

Reputation: 762

1Well it was not as fast as I expected (actually, I think it was pretty slow - it took some minutes to finish), but I've also made a quick test creating a few folders with that structure and some folders with the same name inside it, and it correctly found only the first level ones. So, I believe this is the best of what Windows can do... – Leonardo Alves Machado – 2018-08-17T20:30:08.313

1It seems that this answer does not work for localized versions of Windows (I wonder why they deleted the English localization of options). @massic80 translated it for Italian users: old_releases tipologia:=cartella -percorsocartella:x\*\ – dirdi – 2019-10-02T13:39:42.707