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

  • Thread starter Thread starter Cindy Parker
  • Start date Start date
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
 
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
 
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.
 
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.
 
Back
Top