脚本提示窗口-列出文件 [英] Script Prompt Windows - List Files

查看:93
本文介绍了脚本提示窗口-列出文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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:\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

右方会离开,如下所示:

The Right would leave as shown below:

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

我该如何处理此问题?

推荐答案

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

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

chcp 1252
dir /b /s *.txt

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

这篇关于脚本提示窗口-列出文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆