脚本提示Windows - 列出文件

时间:2016-10-10 19:23:17

标签: windows cmd

我在多个目录中有几个.txt文件。我需要创建这些.txt文件的列表,但由于我的目录名称带有重音符号,因此要创建列表,这些名称会以错误的方式输出逗号和£在目录名称中。示例如下:

C:\xml\UPLOAD\35160101660296000130550020000540011858638110.txt
C:\xml\UPLOAD\35160101660296000130550020000540011858638511.txt
C:\xml\UPLOAD\35160101660296000130550020000540011858638603.txt
C:\xml\UPLOAD\essa ‚ nova pasta\ 35160101660296000130550020000540011858664656.txt
C:\xml\UPLOAD\essa ‚ nova pasta\ 35160101660296000130550020000540011858664810.txt
C:\xml\UPLOAD\pasta n£mero 3\35160101660296000130550020000540011858624546.txt
C:\xml\UPLOAD\pasta n£mero 3\35160101660296000130550020000540011858624848.txt

右边将离开,如下所示:

C:\xml\UPLOAD\35160101660296000130550020000540011858638110.txt
C:\xml\UPLOAD\35160101660296000130550020000540011858638511.txt
C:\xml\UPLOAD\35160101660296000130550020000540011858638603.txt
C:\xml\UPLOAD\essa é nova pasta\35160101660296000130550020000540011858664656.txt
C:\xml\UPLOAD\essa é nova pasta\35160101660296000130550020000540011858664810.txt
C:\xml\UPLOAD\pasta número 3\35160101660296000130550020000540011858624546.txt
C:\ xml\UPLOAD\pasta número 3\35160101660296000130550020000540011858624848.txt

我该如何处理这个问题?

1 个答案:

答案 0 :(得分:0)

您可以将代码页设置为1252,这应该有效。

<?php the_terms( $post->ID, 'genre', 'Genre: ', ', ', ' ' ); ?>

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