ALT-F7->Plugin Search: Directory not found?

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
strohhalm
Junior Member
Junior Member
Posts: 2
Joined: 2009-03-23, 14:32 UTC

ALT-F7->Plugin Search: Directory not found?

Post by *strohhalm »

Hi,

I'm not sure if this issue is really a bug, but I don't understand the reason for it:

I have file located in the following path:
d:\temp\example\folder1\folder2\file.txt

Now go to d:\temp\ and press ALT-F7, select Plugins-tab.

Enter
tc - path - contains - "example\folder1"
tc - directory - = - Yes
=> Start search
=> 1 directory found "d:\temp\example\folder1\folder2"

OK :-)

Now enter
tc - path - contains - "example\folder1\folder2"
tc - directory - = - Yes
=> Start search
=> "no files found"

:?:

The directory is not found, if it is the last one in the current tree. Why?
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

Try tc.fullname instead

The tc.path is the path pointing to the specific file or directory.
d:\temp\example\folder1\folder2


Regards
Holger
strohhalm
Junior Member
Junior Member
Posts: 2
Joined: 2009-03-23, 14:32 UTC

Post by *strohhalm »

OK, I understand the difference between tc.fullname and tc.path.

But tc.fullname does not work with the backslashes in "folder1\folder2".

How do I manage a search after "folder1\folder2" (if I don' t know whether "folder2" has any subdirectories or not)?
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

:oops: Sorry, my fault.

The correct definiton of tc.fullname is

I. if 'tc.ext" is empty:
tc.fullname := tc.name

II. if 'tc.ext' is not empty:
tc.fullname := tc.name+"."+tc.ext

If you want to search exactly for the directory "folder1\folder2\" you need something like

Code: Select all

   tc.directory [=] Yes
&& tc.fullname  [=] folder2
&& tc.path  [ends with] \folder1\
A small problem, because there is no [end with] operator.

Regex can help here:

Code: Select all

   tc.directory [=] Yes
&& tc.fullname  [=] folder2
&& tc.path [regex] (.*)\\folder1\\ 
or as alternative the plugin Filex

Code: Select all

   tc.directory [=] Yes
&& tc.fullname  [=] folder2
&& filex.ParentDir [=] folder1 
Regards
Holger
Post Reply