Directory list with diacritics

D

Darrel

When I run the command DIR and direct the output to a text file letters
in file names with diacritic signs turn to garbage. Is there some way
of getting around this problem by using an MS Word macro?
 
H

Helmut Weber

Hi Darrel,

you may open the txt-file with Word
and select encoding "MS-DOS".

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
K

Klaus Linke

Darrel said:
When I run the command DIR and direct the output to a text file letters
in file names with diacritic signs turn to garbage. Is there some way
of getting around this problem by using an MS Word macro?


Hi Darrel,

I think by default, the command shell uses ANSI, so the DIR command would
already loose the diacritics... no problem of Word.

You could try to tell the command shell to use Unicode, then run DIR:

cmd /U
dir > dir.txt
exit

Regards,
Klaus
 
D

Darrel

Thanks, Helmut.
The problem with this is that Word doesn't always give me that
choice. I've seen it in the past, but trying it now I get no choice
and a garbage word file.
 
D

Darrel

Thanks, Klaus
This works. Quite takes me back in time to using the DOS prompt as a
normal mode of computing. Fussier than just running a batch file, but
the results are there with the diacritics. That's the important
thing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top