Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have several .txt files in multiple directories. I need to create a list of these .txt files, but as I have directories that have names with accents, to create the list, these names come out the wrong way out comma and £ in the name of the directories. Example below:

C:xmlUPLOAD35160101660296000130550020000540011858638110.txt
C:xmlUPLOAD35160101660296000130550020000540011858638511.txt
C:xmlUPLOAD35160101660296000130550020000540011858638603.txt
C:xmlUPLOADessa ? nova pasta 35160101660296000130550020000540011858664656.txt
C:xmlUPLOADessa ? nova pasta 35160101660296000130550020000540011858664810.txt
C:xmlUPLOADpasta n£mero 335160101660296000130550020000540011858624546.txt
C:xmlUPLOADpasta n£mero 335160101660296000130550020000540011858624848.txt

The Right would leave as shown below:

C:xmlUPLOAD35160101660296000130550020000540011858638110.txt
C:xmlUPLOAD35160101660296000130550020000540011858638511.txt
C:xmlUPLOAD35160101660296000130550020000540011858638603.txt
C:xmlUPLOADessa é nova pasta35160101660296000130550020000540011858664656.txt
C:xmlUPLOADessa é nova pasta35160101660296000130550020000540011858664810.txt
C:xmlUPLOADpasta número 335160101660296000130550020000540011858624546.txt
C: xmlUPLOADpasta número 335160101660296000130550020000540011858624848.txt

How do I handle this problem?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
151 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can set the code page to 1252 which should work.

chcp 1252
dir /b /s *.txt

http://ss64.com/nt/chcp.html


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...