Regardless of whether they're files or directories, if there is no file extension, then don't put on the second star, just a *. will do the search for you.  By placing the second star, you're making the os search for extensions by default.  Leave it out, and it will search for just files w/o them. I only said before that typically directories don't have extensions, so that's an easy way to find them.  but in your case, The same thing applies for files without extensions.

On 6/3/2024 6:19 AM, h...@iafrica.com wrote:
Hi
I am looking for files named Q and not directories named Q. In my case I have thousands of assembler text files without filename extensions. It comes from early days starting out with TSC Flex and Uniflex followed by the Mark Williams Coherent operating systems.
John

On 2024/06/02 22:29, tsie...@softcon.com wrote:
 Don't know if it helps, but I've found that if you want *just* directory names, and you don't have a directory program that allows you to set flags, so it only shows directories, then the best way to get them is to do something like:

dir *.

Since most directory names don't have extensions, this only picks out the directory names (and of course, any files without extensions, but those are rare), so that should find the q directory for you with little to no trouble.


On 6/2/2024 5:34 PM, hms--- via Freedos-user wrote:
Hi All
It appears that if a directory exists with the same name as the file one is searching for, the directory listing is terminated early without error. I was searching for a files named "Q" with no extension. I used the commands "DIR Q /S /B" and "DIR Q. /S /B", but it only revealed files in a directory named "Q". An example directory structure is shown  below. Note that most of the file names below do not have extensions. The file named "Q" appears in all the subdirectories. I was puzzled and decided to dig a little further. Is this correct behaviour for the DIR command or a misunderstanding on my part about file name matching? Perhaps an anomaly or a bug? I have tried various DOS's with the same result, the DIR command being an internal one. I have also tried XCOPY and XXCOPY with the "/L" option and it also only finds the files in the "Q" directory. Any thoughts as to what's going on?
John


Directory of  f:\a12\*.*
[.]             [..]            [J]             [Q] [Q.A]
[Q1]            [TS]

Directory of  f:\a12\j\*.*
[.]             [..]            Q

Directory of  f:\a12\q\*.*
[.]             [..]            Q               Q.A Q.ASM
Q1              Q12

Directory of  f:\a12\q.a\*.*
[.]             [..]            Q               Q.A

Directory of  f:\a12\q1\*.*
[.]             [..]            Q               Q.A Q99

Directory of  f:\a12\ts\*.*
[.]             [..]            Q               Q.A Q.ASM

Entering the command below gives the following result.
F:\>DIR Q /S /B
f:\a12\q\Q
f:\a12\q\Q.A
f:\a12\q\Q.ASM
f:\a12\q\Q1
f:\a12\q\Q12

The Q file is only found in the Q directory.

Same result as above with:-
F:\>DIR Q. /S /B

Typing command:
F:\>DIR Q.? /S /B
Gives this result.
f:\a12\Q
f:\a12\Q.A
f:\a12\j\Q
f:\a12\q\Q
f:\a12\q\Q.A
f:\a12\q.a\Q
f:\a12\q.a\Q.A
f:\a12\q1\Q
f:\a12\q1\Q.A
f:\a12\ts\Q
f:\a12\ts\Q.A

The Q file is now found in all the subdirectories.




_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user



_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to