How to store (from cmdprompt) a directory with cyrillic filenames into file.txt ?

C

Cindy Parker

Assume I open a commandprompt and go to a directory

D:\test\mydir\

which contains many files. Some of them have cyrillic filenames.

Now I want to store this directory list into a file.txt. The first approach:

dir >file.txt

does NOT work because commandprompt is not able to handle cyrillic filenames.

How else can I achieve this?

Cindy
 
V

VanguardLH

NOTE: OP used FollowUp-To header to redirect replies to only one of the
original newsgroups despite the OP considered her post on-topic to all
of the cross-posted newsgroups. The original Newsgroup header was
restored in my reply. She thought all the groups were on-topic for her
post so all those same groups are on-topic to continue its discussion.

Cindy said:
Assume I open a commandprompt and go to a directory

D:\test\mydir\

which contains many files. Some of them have cyrillic filenames. Now
I want to store this directory list into a file.txt. The first
approach:

dir >file.txt

does NOT work because commandprompt is not able to handle cyrillic
filenames. How else can I achieve this?

Does the 'tree' command work any better? Since these are DOS commands,
I suspect they only understand ASCII characters.

http://en.wikipedia.org/wiki/8.3_filename#Directory_table
 
P

Pegasus [MVP]

Cindy Parker said:
Assume I open a commandprompt and go to a directory

D:\test\mydir\

which contains many files. Some of them have cyrillic filenames.

Now I want to store this directory list into a file.txt. The first
approach:

dir >file.txt

does NOT work because commandprompt is not able to handle cyrillic
filenames.

How else can I achieve this?

Cindy

Try opening the Command Prompt with this command:

cmd /U

Screen output will now be in ANSI rather than ASCII.
 
1

123Jim

VanguardLH said:
NOTE: OP used FollowUp-To header to redirect replies to only one of the
original newsgroups despite the OP considered her post on-topic to all
of the cross-posted newsgroups. The original Newsgroup header was
restored in my reply. She thought all the groups were on-topic for her
post so all those same groups are on-topic to continue its discussion.



Does the 'tree' command work any better? Since these are DOS commands,
I suspect they only understand ASCII characters.

http://en.wikipedia.org/wiki/8.3_filename#Directory_table


tree /?

Graphically displays the folder structure of a drive or path.

TREE [drive:][path] [/F] [/A]

/F Display the names of the files in each folder.
/A Use ASCII instead of extended characters.
 

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