• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

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

C

Cindy Parker

Flightless Bird
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

Flightless Bird
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 Parker wrote:

> 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]

Flightless Bird
"Cindy Parker" <cypy@live.com> wrote in message
news:4c678d42$0$7651$9b4e6d93@newsspool1.arcor-online.net...
> 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

Flightless Bird
"VanguardLH" <V@nguard.LH> wrote in message
news:i486tr$afs$1@news.albasani.net...
> 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 Parker wrote:
>
>> 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



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.
 
Top