Topic: Wildfile - limit to directory depth (1 of 7), Read 30 times
Conf: Wildfile, Other macros
From: Ian Binnie
Date: Friday, August 06, 2004 05:35 AM

I was running Wildfile (on the MSDN directory from VC6++).

My first search from
E:\MSDNVS60\SAMPLES\
returned 30 hits.

I decided to try
E:\MSDNVS60\
and only got 16 hits.

Further investigations (using a modified wildfile to stop after directory search before Prompt for desired operation) returned 66 & 41 files respectively.

A check using an alternate method (ZTreeWin) showed 911 candidate files.

I suspect that the Vedit Dir is limited to 10 levels, the directory structure I was searching is 13 levels.

 


Topic: Wildfile - limit to directory depth (2 of 7), Read 28 times
Conf: Wildfile, Other macros
From: Christian Ziemski
Date: Friday, August 06, 2004 07:56 AM

On 8/6/2004 5:35:44 AM, Ian Binnie wrote:
>
>I suspect that the Vedit Dir is limited to 10 levels, the
>directory structure I was searching is 13 levels.


Ian:

I can confirm your problem.

I tested the following directory tree below C:\xxx\vedit
with VEDIT's DIR ('"*.*" -s') command:

+---ANSI1252test
+---bbb
+---d1
¦ +---d2
¦ +---d2a
¦ +---d2b
¦ +---d2c
¦ +---d3
¦ +---d4
¦ +---d5
¦ +---d6
¦ +---d6a
¦ +---d7
¦ ¦ +---d7a
¦ ¦ +---d8
¦ ¦ ¦ +---d8a
%< --- missing part ------------------ >%
¦ ¦ ¦ +---d9
¦ ¦ ¦ ¦ +---d10
¦ ¦ ¦ ¦ ¦ +---d11
¦ ¦ ¦ ¦ ¦ +---d12
¦ ¦ ¦ ¦ ¦ +---d13
¦ ¦ ¦ ¦ ¦ +---d14
¦ ¦ ¦ ¦ +---d9a
¦ ¦ ¦ +---d9a
¦ ¦ +---d8a
¦ +---d7a
+---d1a


The result is:

Directory C:\xxx\vedit
Directory C:\xxx\vedit\ANSI1252test
Directory C:\xxx\vedit\bbb
Directory C:\xxx\vedit\d1
Directory C:\xxx\vedit\d1\d2
Directory C:\xxx\vedit\d1\d2\d2a
Directory C:\xxx\vedit\d1\d2\d2b
Directory C:\xxx\vedit\d1\d2\d2c
Directory C:\xxx\vedit\d1\d2\d3
Directory C:\xxx\vedit\d1\d2\d3\d4
Directory C:\xxx\vedit\d1\d2\d3\d4\d5
Directory C:\xxx\vedit\d1\d2\d3\d4\d5\d6
Directory C:\xxx\vedit\d1\d2\d3\d4\d5\d6\d6a
Directory C:\xxx\vedit\d1\d2\d3\d4\d5\d6\d7
Directory C:\xxx\vedit\d1\d2\d3\d4\d5\d6\d7\d7a
Directory C:\xxx\vedit\d1\d2\d3\d4\d5\d6\d7\d8
Directory C:\xxx\vedit\d1\d2\d3\d4\d5\d6\d7\d8\d8a

The DIR command not only isn't able to list deep directory structures
but cancels the listing when reaching a certain level!

This seems to be a little bug...

Christian

 


Topic: Re: Wildfile - limit to directory depth (3 of 7), Read 27 times
Conf: Wildfile, Other macros
From: Ted Green
Date: Friday, August 06, 2004 10:18 AM

At 05:35 AM 8/6/2004, you wrote:

>I suspect that the Vedit Dir is limited to 10 levels, the directory structure I was searching is 13 levels.

Checking the code, I saw this line:

DTAMXLV EQU 10 ;;Maximum depth of recursion

Therefore, I you are correct. This value was probably set back in the DOS days when the max path was 64 chars.

I have changed the code to 20, which hopefully will handle everyone's needs.

I expect to have a VEDIT 6.13 ready in one week. It will have a few fixes discussed in this Forum, the new Unicode-ASCII macros and our new "Flatfile to CSV" function and macro.

Ted.

 


Topic: Re: Wildfile - limit to directory depth (4 of 7), Read 31 times, 1 File Attachment
Conf: Wildfile, Other macros
From: Christian Ziemski
Date: Friday, August 06, 2004 02:13 PM

On Fri, 06 Aug 2004 10:18:00 -0400, Ted Green wrote:

>Checking the code, I saw this line:
>
>DTAMXLV EQU 10 ;;Maximum depth of recursion
>
>Therefore, I you are correct. This value was probably
>set back in the DOS days when the max path was 64 chars.
>
>I have changed the code to 20, which hopefully will handle
>everyone's needs.

Because I absolutely had no clue whether 20 is high or low
I wrote a macro (what else ;-) to check my drive(s).

I found at maximum a level of 16 directories on my PC.
Perhaps it's interesting for others too to know their levels.

The macro is attached.


Christian

 
DIR-FIND-DEEPEST.VDM (1KB)

 


Topic: Re: Wildfile - limit to directory depth (5 of 7), Read 25 times
Conf: Wildfile, Other macros
From: Ian Binnie
Date: Friday, August 06, 2004 09:36 PM

On 8/6/2004 2:13:26 PM, Christian Ziemski wrote:
>On Fri, 06 Aug 2004 10:18:00 -0400, Ted
>Green wrote:
>
>>Checking the code, I saw this line:
>>
>>DTAMXLV EQU 10 ;;Maximum depth of recursion
>>
>>Therefore, I you are correct. This value was probably
>>set back in the DOS days when the max path was 64 chars.

Most of us didn't have 40G hard drives either.

>>I have changed the code to 20, which hopefully will handle
>>everyone's needs.

Should be plenty.
The main offenders seem to be Microsoft & some of the open source programs.

Even if each level only had 2 subdirectories (and there is little point otherwise) this gives 2**20 or 1,000,000 directories. Even allowing for a sparse tree I can't see this being exceeded.

>Because I absolutely had no clue whether
>20 is high or low
>I wrote a macro (what else ;-) to check
>my drive(s).
>
>I found at maximum a level of 16
>directories on my PC.
>Perhaps it's interesting for others too
>to know their levels.

I tried the macro and found 12 on my system drive, 8 on my data & 12 on the work drive. The 13 I quoted before would have included the \ before the filename.

 


Topic: Re: Wildfile - limit to directory depth (6 of 7), Read 27 times
Conf: Wildfile, Other macros
From: Christian Ziemski
Date: Saturday, August 07, 2004 01:42 AM

On Fri, 06 Aug 2004 21:36:00 -0400, Ian Binnie wrote:

>>[Ted wrote:]
>>>I have changed the code to 20, which hopefully will handle
>>>everyone's needs.
>
>Should be plenty.
>The main offenders seem to be Microsoft & some of the open source
>programs.
>
>Even if each level only had 2 subdirectories (and there is little
>point otherwise)

On my drives there are many directories with many more subdirectories
than 2.

>this gives 2**20 or 1,000,000 directories. Even allowing for a
>sparse tree I can't see this being exceeded.

I don't think that whole number is important.
A program/command shouldn't assume that a user doesn't use his limits
(in this case directory depth limit of his operating system).

The special problem with VEDITs DIR() is it's cancelling the directory
listing after hitting the limit, even if the following directories are
of lower depth again!

Christian

 


Topic: Re: Wildfile - limit to directory depth (7 of 7), Read 26 times
Conf: Wildfile, Other macros
From: Ted Green
Date: Sunday, August 08, 2004 07:50 PM

At 09:37 PM 8/6/2004, you wrote:
>Should be plenty.
>The main offenders seem to be Microsoft & some of the open source programs.

Thanks for determining the optimal depth. Since this operations requires various buffers and recursion, setting a huge value, e.g. 100, might overflow a stack or something like that, and be extremely difficult to test.

Unless I hear otherwise, I will test it this week at a depth of 20.

Ted.