Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Very strange dir result - don't know why?

2 views
Skip to first unread message

Ikke

unread,
Feb 19, 2009, 3:59:30 PM2/19/09
to
Hi everybody,

There's a directory on my harddrive which holds a few thousand .csv files.
When I perform a "dir" command to find out if there are files in there with
a certain name, I get a very strange result.

Here's the command and output:
--- start ---
H:\Csvs\a>dir *need*.*
De volumenaam van station H is HDrive
Het volumenummer is 4490-D14F

Map van H:\Csvs\a

14/06/2005 02:27 313.334 AnnAngel-CD12(Final)_4853.csv
1 bestand(en) 313.334 bytes
0 map(pen) 5.476.814.848 bytes beschikbaar
--- end ---

As you can clearly see, there is no "need" in the filename. If I change a
single letter (doesn't matter which one), the "dir" command no longer
returns the name. Adding the letter back to the filename, it pops up again.

Does anybody know the reason for this?

Thanks!

Ikke

R.Wieser

unread,
Feb 20, 2009, 2:41:29 AM2/20/09
to
Hello Jij,

Could that letter-combination be part of the *short* (currently not shown)
filename ?

Regards,
Rudy Wieser

-- Origional message
Ikke <ik...@hier.be> schreef in berichtnieuws
Xns9BB7DFB7C3...@69.16.176.253...

thanatoid

unread,
Feb 20, 2009, 3:55:46 AM2/20/09
to
Ikke <ik...@hier.be> wrote in
news:Xns9BB7DFB7C3...@69.16.176.253:

Probably one of thousands of unique and never-documented (since
they never actually happened to anyone or maybe only 1 or 2
people) bugs in DOS.

Using the "dir" command to find out if there's ANYTHING in a
directory is a bizarre approach, if I may say so.

Get XTree or Total Commander for DOS and you won't have to worry
about it anymore.

There is also a great program called Directory Printer for Win32
(one of several, but I like it the most).
http://www.galcott.com

As a last resort, ACDSee (which you probably have) has a
"generate file listing" under "tools (or it did before it became
bloatcrapware).


--
"Who knows what the OP is talking about?"
(about thanatoid)

foxidrive

unread,
Feb 20, 2009, 6:50:12 AM2/20/09
to
On Fri, 20 Feb 2009 08:41:29 +0100, "R.Wieser" <add...@not.available>
wrote:

>Hello Jij,
>
> Could that letter-combination be part of the *short* (currently not shown)
>filename ?

>> --- start ---


>> 14/06/2005 02:27 313.334 AnnAngel-CD12(Final)_4853.csv

>> --- end ---
>>
>> As you can clearly see, there is no "need" in the filename.

>> Does anybody know the reason for this?

As Rudy says, the DIR command searches both the long and short names.

Todd Vargo

unread,
Feb 20, 2009, 5:21:46 PM2/20/09
to
foxidrive wrote:

> R.Wieser wrote:
> >Hello Jij,
> >
> > Could that letter-combination be part of the *short* (currently not
shown)
> >filename ?
>
> >> --- start ---
> >> 14/06/2005 02:27 313.334 AnnAngel-CD12(Final)_4853.csv
> >> --- end ---
> >>
> >> As you can clearly see, there is no "need" in the filename.
>
> >> Does anybody know the reason for this?
>
> As Rudy says, the DIR command searches both the long and short names.

In Windows 98, the short name is ANNANG~1.CSV

"need" does not exist in the short name either.

Can this anomaly be reproduced? In what OS?
Does it occur at the command line and/or in a batch file?

--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)

Nathaniel Savage

unread,
Feb 21, 2009, 6:47:19 AM2/21/09
to

In (standard DOS) the wild card characters are limited,; there's no
substring searching.

DIR *xx*.* should return all files, as it's the same as DIR *.*

longwinded workaround:

dir need*.*
dir ?need*.*
dir ??need*.*
dir ???need?.*
dir ????need.*

--
#Do you know where you're going to?

foxidrive

unread,
Feb 21, 2009, 9:46:26 AM2/21/09
to
On Fri, 20 Feb 2009 17:21:46 -0500, "Todd Vargo" <tlv...@sbcglobal.netz>
wrote:

>> >> --- start ---
>> >> 14/06/2005 02:27 313.334 AnnAngel-CD12(Final)_4853.csv
>> >> --- end ---
>> >>
>> >> As you can clearly see, there is no "need" in the filename.
>

>In Windows 98, the short name is ANNANG~1.CSV
>
>"need" does not exist in the short name either.
>
>Can this anomaly be reproduced? In what OS?

It's an NT version from the listing output and the shortnames are not
generated from the long filenames in a lot of cases. See below:

short name long name

SOUNDS~4.MP3 Sounds of Nature - Desert.mp3
SO47BB~1.MP3 Sounds of Nature - Downpour.mp3
SO2B6C~1.MP3 Sounds of Nature - Fireside.mp3
SO8017~1.MP3 Sounds of Nature - Jungle.mp3
SO2750~1.MP3 Sounds of Nature - Riverside.mp3
SO316F~1.MP3 Sounds of Nature - Storm.mp3
SO70D1~1.MP3 Sounds of Nature - Summer.mp3
SO3F3E~1.MP3 Sounds of Nature - Tropical Beach.mp3
SO399C~1.MP3 Sounds of Nature - Woodland.mp3


Message has been deleted

Todd Vargo

unread,
Feb 21, 2009, 9:55:34 PM2/21/09
to
foxidrive wrote:

Thanks foxidrive, I knew it was of the NT variety, just not if it mattered
which one. From the character positions, it looks like it is possible that
EED could have been generated to follow the first two characters.

If OP would type,

dir *need*.* /X

that would confirm the short name (at least for the OP).

Ikke

unread,
Feb 22, 2009, 4:11:15 PM2/22/09
to
"R.Wieser" <add...@not.available> wrote in
news:499e5d4a$0$3513$e4fe...@dreader25.news.xs4all.nl:

> Hello Jij,
>
> Could that letter-combination be part of the *short* (currently not
> shown)
> filename ?

Hi Rudy,

After checking the short filename (which I didn't realise it existed), it
turns out that it indeed matched my dir request!

As it turns out, "dir" checks both filenames for a match.

Thanks for clearing this up!

Also, thanks to everyone who pitched in to help!

Best regards,

Ikke

Ikke

unread,
Feb 22, 2009, 4:15:16 PM2/22/09
to
thanatoid <wai...@the.exit.invalid> wrote in
news:Xns9BB81DDB1...@209.197.15.184:

<snip>


> Using the "dir" command to find out if there's ANYTHING in a
> directory is a bizarre approach, if I may say so.

Just out of interest - why would you or do you find this a bizarre
approach? It's a lot faster than starting whatever shell imho, and it's a
lot more efficient than using the default Windows search.



> Get XTree or Total Commander for DOS and you won't have to worry
> about it anymore.

I use Total Commander (the Windows version) a lot, didn't even realise
there was a search in there :)

Just tried it, and the "dir" command is (as expected) a lot faster.



> There is also a great program called Directory Printer for Win32
> (one of several, but I like it the most).
> http://www.galcott.com
>
> As a last resort, ACDSee (which you probably have) has a
> "generate file listing" under "tools (or it did before it became
> bloatcrapware).

ACDSee is indeed one of the tools I use a lot - the early version, that is,
nowadays it is terrible I find...

I've checked the "generate file listing" option, but this just generates a
list, and doesn't allow me to quickly search for a file.

Thanks anyway!

Best regards,

Ikke

thanatoid

unread,
Feb 22, 2009, 10:10:04 PM2/22/09
to
Ikke <ik...@hier.be> wrote in
news:Xns9BBAE266FB...@69.16.176.253:

> thanatoid <wai...@the.exit.invalid> wrote in
> news:Xns9BB81DDB1...@209.197.15.184:
>
> <snip>
>> Using the "dir" command to find out if there's ANYTHING in
>> a directory is a bizarre approach, if I may say so.
>
> Just out of interest - why would you or do you find this a
> bizarre approach? It's a lot faster than starting whatever
> shell imho, and it's a lot more efficient than using the
> default Windows search.

We're in DOS, so no Windows search, not that /it/ would be
terribly useful either.

The "dor" info is quite limited and many more commands will need
to be typed (or doskey'd, alias'd, etc.) to get the info the
user is really after.

Starting XTree Gold (or something equally good) with one
shortcut key (using Alias or some other shortcut utility) is
infinitely more flexible.

I can see why some people still want to use DOS only but I would
find it hard to understand why someone would not want to install
a real file manager like XTree.

>> Get XTree or Total Commander for DOS and you won't have to
>> worry about it anymore.
>
> I use Total Commander (the Windows version) a lot, didn't
> even realise there was a search in there :)

It has an ASTONISHING amount of features, unbelievable in fact.

But I was wrong, there is no DOS version (there is a Win 3.1
version), I guess you go to the original (Norton Commander) for
that.

> Just tried it, and the "dir" command is (as expected) a lot
> faster.

Speed is not everything, in spite of being just about the only
thing computer magazine reviews seem to be concerned with.

>> There is also a great program called Directory Printer for
>> Win32 (one of several, but I like it the most).
>> http://www.galcott.com
>>
>> As a last resort, ACDSee (which you probably have) has a
>> "generate file listing" under "tools (or it did before it
>> became bloatcrapware).
>
> ACDSee is indeed one of the tools I use a lot - the early
> version, that is, nowadays it is terrible I find...

www.oldversion.com, www.oldapps.com, www.tinyapps.org (that's
just a great site, no specifically an "old versions" site).

I use ver 2.22. ver 8.1 is a 24MB DL.

> I've checked the "generate file listing" option, but this
> just generates a list, and doesn't allow me to quickly
> search for a file.

Well, at least it gives you SOMETHING to wade through AOT a
blank screen.

Anyway, this is a DOS group, so WHAT exactly are you looking
for? I am increasingly unclear on the issue.

R.Wieser

unread,
Feb 23, 2009, 3:26:36 AM2/23/09
to
Hello Ikke,

> After checking the short filename (which I didn't realise it existed),
> it turns out that it indeed matched my dir request!

...


> Thanks for clearing this up!

No problem. :-)


-- Origional message
Ikke <ik...@hier.be> schreef in berichtnieuws

Xns9BBAE1B822...@69.16.176.253...

0 new messages