Find in subdirectories, but only search in specific folders

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
heeloud16
Junior Member
Junior Member
Posts: 19
Joined: 2006-11-08, 13:08 UTC

Find in subdirectories, but only search in specific folders

Post by *heeloud16 »

In TC with find files it is possible to search for files within multiple directories.
Imagine I do have 5 directories. Each directory contains a certain directory structure but all the 5 are the same. It will only have other data, but the directory structure is the same.

Now if I'm selecting all 5 directories to search for files which could only be located in /samplex/subfolder/subfolderx/*.* I'm not able to tell this in TC.

In TC all the subfolders are checked. How to instruct TC to look trough all the selected root directories, but ONLY look in the ceratain subfolders.

Because something like this does not work:

c:\cc\pvmeta\*\codelijst
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

I don't understand comletely your questions, but I have some thoughts:
1. There is an "exclude" char (pipe |). Press Alt+F7, F1 and read. That is, you can tell to TC: "DO NOT search in these directories".
2. You can also restrict the directory level to search in. It's a dropdown box "Search in subdirectories".
3. Finally, you can switch the branch view on (Ctrl+B) and then manually in-/exclude files (after seach and "Feed to listbox").
Single user license #329241
PowerPro scripts for Total Commander
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Also you may add unwanted dirs to TC ignore list and turn it on before searching.
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Improved soon…

Post by *Clo »

2Vochomurka

:) Hello !
… 3. Finally, you can switch the branch view on (Ctrl+B) and then manually in-/exclude files (after seach and "Feed to listbox").
• A good way which should be simplified and improved soon… :wink:

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
eliio
Junior Member
Junior Member
Posts: 25
Joined: 2018-06-17, 03:57 UTC
Location: Khimki
Contact:

Re: Find in subdirectories, but only search in specific folders

Post by *eliio »

Old thread but the question is still relevant: is it possible to search for files only in particular directories below "Search in".
In other words I need something like "inversed" alternative of an "exclude" character "|",
because the directory structure I search in is pretty complex and the directories I should exclude in case of "|" are "everything but..."
Last edited by eliio on 2018-12-19, 05:40 UTC, edited 1 time in total.
TC 9.51 32-bit on Win 10 x64
jberry910
Junior Member
Junior Member
Posts: 25
Joined: 2010-02-08, 02:43 UTC
Location: Illinois, USA

Re: Find in subdirectories, but only search in specific folders

Post by *jberry910 »

Yes, mark directories to search and choose the "Only search in selected directories box on the search dialog.
Joe
Central Illinois, USA
User avatar
eliio
Junior Member
Junior Member
Posts: 25
Joined: 2018-06-17, 03:57 UTC
Location: Khimki
Contact:

Re: Find in subdirectories, but only search in specific folders

Post by *eliio »

That's not what I meant. Let's say I want to search in "Work" directory, in this directory I have dozens of subdirectories like this: \Alpha\@Material, \Beta\@Material, \Beta\Gamma_1\@Material, \Beta\Gamma_2\@Material, etc. And I need to search only in the "@Material" directories.
So even if I could... wait...

Oh, I can do it in two steps! First, I search for directories "@Material" in "Work", then I feed the results to listbox, select all, and this time search for the necessary file only in these directories ("Only search in selected directories/files" is on).
Thank You!
TC 9.51 32-bit on Win 10 x64
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: Find in subdirectories, but only search in specific folders

Post by *tuska »

eliio wrote: 2018-12-19, 05:37 UTC Let's say I want to search in "Work" directory, in this directory I have dozens of subdirectories like this:
\Alpha\@Material, \Beta\@Material, \Beta\Gamma_1\@Material, \Beta\Gamma_2\@Material, etc. And I need to search only in the "@Material" directories.
Search queries using ☑ 'Everything' can also be performed in TC.

Search for:

Code: Select all

ed:*\@Material files:		) Search query up from active directory "Work",
ed:*\@Material file.ext		) directory depth can be set
TC Parameter --> ed:
Search in TC with "Everything" from current directory - adjustable directory depth! - even if field "Search in:" is empty.

*\    --> Leading * denotes parent folders

Search for:

Code: Select all

ev:*\@Material files:	
ev:*\@Material file.ext
TC Parameter --> ev:
If ev: is entered in TC in the field "Search for:" then
- in TC the path and the drives in the field "Search in:" are ignored! ...
- this means that the search in TC is performed in all drives/folders using "Everything".
  However, the search is only carried out in those drives/folders that have been defined accordingly in the "Everything" settings,
  i.e. under menu "Tools" - "Options..."
  - Indexes: NTFS (Local volumes) - ☑ Include in database,...                   (Hard disks + USB drives: NTFS formatted)
  - Indexes: Folders              - ☑ Attempt to monitor changes, ◉ Update  (e.g. network folders, USB drives[FAT32,...], etc.)
  Indexes: NTFS, Indexes: Folders

See also:
Info TC <-> Everything

Windows 10 Pro (x64) Version 1809 (OS Build 17763.194)
TC 9.21a - 32 bit + 64 bit | Everything - Version 1.4.1.922 (Public release) - (x64)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Find in subdirectories, but only search in specific folders

Post by *ghisler(Author) »

Or use the plugins page:
tc - path - contains - @Material
Author of Total Commander
https://www.ghisler.com
User avatar
eliio
Junior Member
Junior Member
Posts: 25
Joined: 2018-06-17, 03:57 UTC
Location: Khimki
Contact:

Re: Find in subdirectories, but only search in specific folders

Post by *eliio »

Cool! Thank You!
TC 9.51 32-bit on Win 10 x64
Post Reply