Page 1 of 1

Gibberish when redirecting dir to txt file

Posted: 23 Apr 2011 07:32
by drgt
xp sp2.

Command Line:

Code: Select all

Z:\Kids>dir *.mp3 /s /b
Z:\Kids\BebeLili\bebecd\Κομμάτι 1.mp3
Z:\Kids\BebeLili\bebecd\Κομμάτι 2.mp3
Z:\Kids\BebeLili\bebecd\Κομμάτι 3.mp3
Z:\Kids\BebeLili\bebecd\Κομμάτι 4.mp3


Test.txt file:

Code: Select all

Z:\Kids\BebeLili\bebecd\‰¦££α«  1.mp3
Z:\Kids\BebeLili\bebecd\‰¦££α«  2.mp3
Z:\Kids\BebeLili\bebecd\‰¦££α«  3.mp3
Z:\Kids\BebeLili\bebecd\‰¦££α«  4.mp3


This happens on files whose names are not in english, greek in this case.
I checked regional settings in control panel, they are set for Greek.

Any suggestions?
Thanks

Re: Gibberish when redirecting dir to txt file

Posted: 23 Apr 2011 18:01
by !k
Use unicode output

Code: Select all

cmd /u /c dir *.mp3 /s /b > Test.txt

or change codepage to Greek

Code: Select all

chcp 1253
dir *.mp3 /s /b > Test.txt

Gibberish when redirecting dir to txt file

Posted: 23 Apr 2011 23:52
by drgt
Thank you !!!!!