How to get the equivalent of DOS command DIR into a text file?

  • Thread starter Thread starter David
  • Start date Start date
D

David

I use W2K+SP2 + foreign language support.

If I run the old DIR command in a console, it can't recognize none English
characters (it puts '?' instead of each character not recognized) in the
file names.

On the other hand, Windows Explorer, which does show the file names
correctly but does not provide an option to save the content of the
"detailed view" into a text file (which I would consider almost
unbelievable). DIR did it using the redirection character '>'.

So is there a solution to such a trivial issue in W2K?

Thanks,
David
 
David said:
I use W2K+SP2 + foreign language support.

If I run the old DIR command in a console, it can't recognize none
English characters (it puts '?' instead of each character not
recognized) in the file names.

On the other hand, Windows Explorer, which does show the file names
correctly but does not provide an option to save the content of the
"detailed view" into a text file (which I would consider almost
unbelievable). DIR did it using the redirection character '>'.

So is there a solution to such a trivial issue in W2K?

Thanks,
David

a simple

DIR *.* >test.txt

from a CMD prompt will pipe a directory listing to a text file called
test.txt
 
Steve Parry said:
a simple

DIR *.* >test.txt

from a CMD prompt will pipe a directory listing to a text file called
test.txt

Did you read this from the OP:

"If I run the old DIR command in a console, it can't recognize none English
characters (it puts '?' instead of each character not recognized) in the
file names."

That is his problem with using DIR and redirecting to a file, e.g. for the
three extra non-Latin norwegian characters:

file name in explorer:
øæå.txt

same file name in a file redirected from the dir command:
›‘†.txt
 
Torgeir said:
Did you read this from the OP:

"If I run the old DIR command in a console, it can't recognize none
English characters (it puts '?' instead of each character not
recognized) in the file names."

That is his problem with using DIR and redirecting to a file, e.g.
for the three extra non-Latin norwegian characters:

file name in explorer:
øæå.txt

same file name in a file redirected from the dir command:

a problem given I'm using an english system that I'm not likely to have
come across I guess
 
have you tried a different codepage in the console?

MODE /? for parameters

I don't know the 3 digit number off hand for what you need so you would
have to hunt that down.
 
Steve Parry said:
Hi Torgier

Hey I see you work for Hydro, small world we have one of their plants
not far from here.

Hi Steve

Jup, small world ;-)

After looking up your Web site and then Hydro sites in the UK, is that Hydro
Aluminium Deeside in Wrexham?
 
Torgeir said:
Hi Steve

Jup, small world ;-)

After looking up your Web site and then Hydro sites in the UK, is
that Hydro Aluminium Deeside in Wrexham?

Yes, I have been there I think when I was an NT systems support engineer
with my previous employers to resolve some Lotus Notes issues I think
.... its a long time ago so I not 100% sure on the .. seem to recall
someone called Alan was the IT bod there at the time.
 
Back
Top