Topic: Unexpected behavior in Dir() command (1 of 7), Read 24 times
Conf: VEDIT Macro Language Support
From: Gary Darsey
Date: Tuesday, August 10, 2004 03:37 PM

I was trying various wildcard parameters in the Dir() command and found the following behavior:

-when Dir("*1*.*") is given to find all filenames with a "1" in them, other files are found as well. If any other digit or letter is used, it seems to be fine -- it appears to get confused by the "1".

Any suggestions?

-Gary

 


Topic: Re: Unexpected behavior in Dir() command (2 of 7), Read 22 times
Conf: VEDIT Macro Language Support
From: Ted Green
Date: Tuesday, August 10, 2004 03:50 PM

At 11:37 AM 8/10/2004, you wrote:
>I was trying various wildcard parameters in the Dir() command and found the following behavior:
>
>-when Dir("*1*.*") is given to find all filenames with a "1" in them, other files are found as well. If any other digit or letter is used, it seems to be fine -- it appears to get confused by the "1".

Gary:

Since this is an OS question, PLEASE, PLEASE, PLEASE mention what version of windows you are running and always mention what version of VEDIT you have.

I have not yet tested it, but it might be matching the "~1" in the short version of many long filenames.

Ted.

 


Topic: Re: Unexpected behavior in Dir() command (3 of 7), Read 22 times
Conf: VEDIT Macro Language Support
From: Gary Darsey
Date: Tuesday, August 10, 2004 07:34 PM

Sorry...

VEDIT 6.12.1, Win 2000 Pro or XP Pro.

With further investigation, it must be picking up the "~1" (and also "~2", etc.) of the short 8.3 filenames. Is there any way to force Dir() to use the long filenames?

I was trying to think about the recent search and replace filenames in the recent question above.

-Gary

 


Topic: Re: Unexpected behavior in Dir() command (4 of 7), Read 20 times
Conf: VEDIT Macro Language Support
From: Gary Darsey
Date: Tuesday, August 10, 2004 10:26 PM

The command line dir command shows the same behavior, which I was not aware of (that is, searching on the 8.3 filename and not the full filename). Using the command line dir /x switch showed exactly what was happening. I was hoping to effect some selectivity by using command line or VEDIT Dir(), but this does not appear possible. So what is the use of the long filenames if they can't really be used effectively with wildcards in commands?

So I guess this behavior is not unexpected for the more informed. I was deceived that Dir("path",COUNT,1) provided the full filename, so I thought I could use wildcards.

-Gary

 


Topic: Re: Unexpected behavior in Dir() command (5 of 7), Read 18 times
Conf: VEDIT Macro Language Support
From: Ian Binnie
Date: Tuesday, August 10, 2004 11:47 PM

On 8/10/2004 10:26:18 PM, Gary Darsey wrote:
>The command line dir command
>shows the same behavior, which
>I was not aware of (that is,
>searching on the 8.3 filename
>and not the full filename).

I do not believe that this is the case.

The basic problem is the string "*1*."
This is not supported by Windows, although the Microsoft documentation fails to specify exactly what is supported.
You could try their knowledgebase.

Support unfortunately also varies between Windows versions. (You do not specify what you are using.)

The Help in XP, very unhelpfully, contains information about wildcard in DOS "The asterisk (*) wildcard character cannot be placed before a static string in a wildcard search path."

A more reliable way of performing your task in a command window would be:-
dir /b | find "1"

Alternately use the Vedit Dir, then search for lines containing "1"

 


Topic: Re: Unexpected behavior in Dir() command (6 of 7), Read 16 times
Conf: VEDIT Macro Language Support
From: Ted Green
Date: Tuesday, August 10, 2004 11:52 PM

At 06:26 PM 8/10/2004, you wrote:
>From: "Gary Darsey"
>
>The command line dir command shows the same behavior, which I was not aware of (that is, searching on the 8.3 filename and not the full filename).

I will see if we can restrict the wildcard search to the long filename portion. I will add it to the bug list, but cannot give it a high priority right now.

Ted.

 


Topic: Re: Unexpected behavior in Dir() command (7 of 7), Read 16 times
Conf: VEDIT Macro Language Support
From: Gary Darsey
Date: Wednesday, August 11, 2004 08:24 AM

Based on these posts, I don't really think it's a bug, since the OS (Win 2000 Pro and XP) command line does the same thing. I was just trying to do some "front end" selection of filenames before bringing the list into VEDIT, but it looks like the best approach is to do the searching in VEDIT after bringing the Dir() list in, like in Christian's macro for file renaming (I was trying to do something similar).

I have too high of expectations for the OS, but once again, VEDIT has to make up for OS deficiencies!

-Gary