You are on page 1of 13

Pbice's Blog: 用Dir指令列出Unicode檔名清單

0
更多

下一個網誌» 建立網誌
登入

Pbice's Blog

關於我自己
2010-11-06
準棒
研究所肄業,興
用Dir指令列出Unicode檔名清單 趣是語音學和華
語教學,請多指
我原本就知道MS-DOS模式底下的dir指令可以將結果輸出成文字檔,這樣可以很方便的將所有檔案 教。
的檔名做成清單。不過,遇到Unicode檔名該如何處理?看了這篇文章〈利用 dir 將檔案總管中的目 檢視我的完整簡介
錄裏的檔名轉成文字檔〉,覺得很實用,摘記如下:
搜尋此網誌
1. 先新增一個文字檔(例如list.txt),將編碼改成Unicode。
2. 輸入cmd /u,以Unicode模式執行。
搜尋

3. 執行dir指令,dir >> list.txt。如果只想列出檔名、不要日期、路徑等資訊,可以加參數 b。


4. 注意輸出時一定要有2個輸出符號>>,否則會亂碼。
分類
如果需要大量更改檔名,可以配合Ant Renamer使用。
心情偶記
(12)
北京札記
(13)
張貼者:
準棒

8:51:00 下午

華語教學
(20)
標籤:
電腦網路
電腦網路
(35)
語言學
(13)
語音學
(35)
數位學習
(23)
4 則留言: 轉貼文章
(4)

匿名
提到... 讀書心得
(22)

謝謝你, 我找了很久也找不到方法, 原本有 CMD/U 便可解決了


最近的文章
1/14/2012 05:23:00 下午
用Dir指令列出Unicode檔名清


匿名
提到... 【讀書心得】Phonetic
Symbol Guide
谢谢你,讓我解決了我的難題,方便多了。
美國大學有多少人學習中文
9/16/2012 04:11:00 下午 換個布景主題
外國口音導致可信度降低
直接模仿的發音教學

creation
提到...
吳宗濟先生逝世
Many thanks for making the truthful effort to explain this. I feel very strong about it and would 新電腦!
like to read more. If you
重啟部落格
can, as you find out more in depth knowledge, would you mind posting more posts similar to
【讀書心得】咖啡學:祕史、
this one with more information.
精品豆與烘焙入門
Qassim University
12/22/2013 04:32:00 下午
這個小工具發生錯誤


林金龍
提到... 網誌存檔

太感謝了!原來要<<才不會變成亂碼!哈哈! ▼ 
2010
(9)
5/25/2014 06:59:00 下午 ▼ 
十一月
(2)
用Dir指令列出Unicode檔
張貼留言 名清單
【讀書心得】Phonetic
Symbol Guide

► 
十月
(1)
這篇文章的連結 ► 
九月
(2)

http://pbice.blogspot.hk/2010/11/dirunicode.html[6/12/2016 8:06:28 PM]


How to print the contents of a folder in Windows 7, 8, and 8.1 [Guide] | Reviews, news, tips, and tricks | dotTechdotTech

Register / Login
Search

Previous Post Next Post

How to print the contents


of a folder in Windows 7,
8, and 8.1 [Guide]
Tip / Trick By Madrao - March 17, 2014 - 17 Comments
Email article | Print article

Ever had a situation where you wished you could print out a list
of all the contents of a folder or directory in Windows but
couldn’t quite find any tool which could do that. Sure, hitting
Print Screen and then pasting the contents of the clipboard
onto Paint is an option. But not a very helpful one, if you
wanted to edit the list later. Here’s a cool tip which will help you
create a text file which lists out all files and/or sub folders
within a said folder, and can be easily printed out later, should
you need to do that.

HOW TO PRINT THE CONTENTS OF A FOLDER


IN WINDOWS 7, 8, AND 8.1
Using Windows Explorer , Open the Folder whose
contents you want to print as a list

https://dottech.org/151597/how-to-print-the-contents-of-a-folder-in-windows-7-8-and-8-1-guide/[28/05/2016 19:03:48]
How to print the contents of a folder in Windows 7, 8, and 8.1 [Guide] | Reviews, news, tips, and tricks | dotTechdotTech

Hold down the Shift key and Right-click on any blank


space in the folder, and select Open Command Window
Here from the Right-Click Menu

In the command prompt that pops up, type in the following


commanddir > List.txt

This will automatically create a text file named List.txt


inside the target folder

Open the List.txt file to view a complete list of files and

https://dottech.org/151597/how-to-print-the-contents-of-a-folder-in-windows-7-8-and-8-1-guide/[28/05/2016 19:03:48]
How to print the contents of a folder in Windows 7, 8, and 8.1 [Guide] | Reviews, news, tips, and tricks | dotTechdotTech

folders, that you can easily print out if you need to

That was simple, wasn’t it? So if you ever need to print out a
list of all the files and sub-folders within a folder in Windows, it
shouldn’t take more than a few seconds to do that if you use
this tip.

Previous
Post
Next Post

https://dottech.org/151597/how-to-print-the-contents-of-a-folder-in-windows-7-8-and-8-1-guide/[28/05/2016 19:03:48]
filenames - Get bare file names recursively in command prompt - Super User

sign up log in tour help search

Questions Tags Users Badges Unanswered Ask Question

_
Super User is a question and answer site Here's how it works:
for computer enthusiasts and power
users. It's 100% free, no registration
required.

Sign up Anybody can ask Anybody can The best answers are voted
a question answer up and rise to the top

Get bare file names recursively in command prompt

asked 4 years ago

viewed 23887 times

active 3 years ago

I ran into a little snag trying to get only the filenames (no extensions or file paths) recursively.This
worked for me in the root folder:
11
dir /b

But when i added /s to scan recursively i also got file paths before filenames which i do not want.
Is there a way to get bare filenames from all subfolders in a directory?
1
Im on Windows 7 x64 I'd rather use regular command prompt not PS or VBS

command-line filenames recursive

share improve this question


asked Jun 7 '11 at 15:59

Linked
TMRW
469 3 11 22 10
How do I recursively list filenames (only) in
add a comment DOS/Windows?

Related
2 Answers active oldest votes
5
Replace spaces in file names from cmd line unix

2
Use the following command: Recursively renaming .foo files based on name of
accompanying .bar file in multiple folders in
9 dir /b /a /s Windows 7?

/b strips the date and other details from the output 10


How do I recursively list filenames (only) in
/a only outputs the filename, no paths DOS/Windows?
/s enables a recursive directory listing
11

If you need to save the output to a file, you can use: Windows explorer sees different file name from
cmd
dir /b /a /s >> list_of_names.txt
2

EDIT Actually the above solution doesn't reach the original question's goals. One thing I did notice Escaping %’s in file-/folder-names at the
command-line
from the question is that the post asks for recursive listing. which the other answer lacks so I think
adding "/s" in the other answerer's answer will do the trick 0

http://superuser.com/questions/294099/get-bare-file-names-recursively-in-command-prompt[28/05/2016 19:34:52]
filenames - Get bare file names recursively in command prompt - Super User

how to make a folder with the same name as a file


for /f %a in ('dir /b /s') do @echo %~na in command prompt (Recurse subfolders)

share improve this answer 5


edited Nov 9 '11 at 5:27 answered Nov 8 '11 at 21:58 How to fix diacritic issue on command prompt?

0
Nik So How to organize files in accordingly named
301 3 10 directories from command line under Linux

0
How can I list all files recursively that have the
Could you explain this? To me it makes little sense. – Simon Sheehan Nov 8 '11 at 23:27
compressed attribute set?
This doesn't work, /a doesn't work like that - it's a filter for which type of files you want to list. It doesn't strip
0
the path from the filename when doing a recursive directory listing. – 8088 Nov 9 '11 at 2:28
How to export File Names (Only Image Files) from
edited the answer; and just got my hands on a windows box again, I think this time should do it (win732bit) various location or directory into a text file
– Nik So Nov 9 '11 at 5:27
Hot Network Questions
add a comment
Where does a javascript closure live?

Besides mathematical induction how else can you


prove these two functions are equal?

Correct way to add 22 to 4 to get 82

Unicode symbol for space prints some kind of


rising dash?

How to differentiate product of vectors (that gives


scalar) by vector?
Try this:
Why is this new result such a big deal?
4 for /f "delims=" %a in ('dir /b /s') do @echo %~na
IP address to Domain

More information on how for works and what it's doing, type for /? How did Darth Vader know the rebel base was on
Hoth?
share improve this answer Requesting All Student's Grades From Professor
edited Jan 22 '13 at 20:43 answered Jun 7 '11 at 16:18
Largest Bitcoin transaction fee ever paid?

What is the part of a stage ahead of the curtain


Community ♦ Multiverse IT called?
1 3,495 7 17
Generate Wordenticons

What do you call this problem in the knee area of


the jeans?
This almost works but there's a big problem.It only outputs the first word of a filename.If a filename is for
example "my vacation image 1" then it only outputs "my" – TMRW Jun 8 '11 at 4:10 Will flat earth society membership affect my
graduate school application?
try this: for /f "delims=|" %a in ('dir /b') do @echo %~na. By default the /f parameter of FOR will tokenize on
spaces. Setting the token to a character that shouldn't appear in file/directory names will give you the entire Why won't President Obama apologize for the
name including spaces. – Scott McKinney Nov 8 '11 at 22:17 atomic bombings of Hiroshima and Nagasaki?

Is there any list of filetype extension names?


add a comment
How could matings between two species produce
only female offspring?

What percentage of altcoins are based on


Bitcoin?
Your Answer
How can I earn kills with Hanzo's Scatter Arrow?

Damped oscillator: time-reversal, time-translation


and dissipation

Are there commercial rockets with fins?

What does this symbol represent? "x" with four


dots

Ireland power plug and concern about 230 V vs.


220 V

How do I remove labels from glass jars/bottles?

http://superuser.com/questions/294099/get-bare-file-names-recursively-in-command-prompt[28/05/2016 19:34:52]
在開啟及儲存檔案時選擇文字編碼方式 - Word

 登入

支援 

在開啟及儲存檔案時選擇文字編碼
方式
適用對象: Word 2016, Word 2013, Word 2010

一般而言,您可以直接共用文字檔,而不需考慮文字的儲存方式這種基本的細節。不過,如果您要和
使用其他語言的人共用文字檔、透過網際網路下載文字檔,或是和其他電腦系統共用文字檔,您可能
需要在開啟或儲存檔案時選擇編碼標準。

當您或其他人在 Microsoft Word 或其他程式中 (可能程式所在電腦的系統軟體語言和用來建立檔案的


語言不同) 開啟文字檔時,編碼標準會協助程式判斷要讓文字成為可讀的呈現方式。

您想要做什麼?

了解文字編碼方式
開啟檔案時選擇編碼標準
儲存檔案時選擇編碼標準
查詢 Word 中可用的編碼標準

了解文字編碼方式

您在螢幕上看到的文字,實際上是以數值方式儲存在文字檔中。電腦會將這些數值轉譯成有形的字
元,它是利用編碼標準來進行轉譯。

編碼標準是一種數字配置,會指定數值給字元集中的每一個文字字元。字元集可以包含字母字元、數
字及其他符號。不同語言通常是由不同字元集構成,因此會有很多不同的編碼標準存在,用於呈現不
同語言所用的字元集。

不同字母系統使用不同的編碼標準

https://support.office.com/zh-tw/article/在開啟及儲存檔案時選擇文字編碼方式-60d59c21-88b5-4006-831c-d536d42fd861[6/12/2016 8:10:09 PM]


在開啟及儲存檔案時選擇文字編碼方式 - Word

隨附文字檔一起儲存的編碼標準會提供電腦在螢幕上顯示文字所需的資訊。例如,在斯拉夫文
(Windows) 的編碼方式中,Й 這個字元的數值是 201。當您在使用斯拉夫文 (Windows) 編碼方式的電
腦上開啟含有這個字元的檔案時,電腦會讀取 201 這個數值,然後在螢幕上顯示 Й。

不過,如果您在使用不同編碼方式的電腦上開啟同一個檔案,電腦就會顯示它預設使用的編碼標準中
201 這個數值所對應的任何字元。例如,如果電腦是使用西歐 (Windows) 編碼標準,原本斯拉夫文檔
案中的那個字元就會顯示為 É,而不是 Й,因為在西歐 (Windows) 的編碼方式中,201 這個值是對應
到 É。

Unicode:適用於許多字母系統的編碼標準
若要避免發生編碼及解碼文字檔的問題,您可以使用 Unicode 編碼方式儲存檔案。Unicode 適用於現
今電腦使用者常用的所有語言的大部分字元集。

因為 Word 是以 Unicode 為基礎,所以 Word 會自動使用 Unicode 編碼方式來儲存檔案。不論是哪一


種語言的文字,您都可以在英語的電腦系統上開啟及讀取 Unicode 編碼的檔案;同樣的,當您使用英
語系統以 Unicode 編碼方式儲存檔案時,檔案內容可以包含西歐字母系統以外的字元,例如希臘文、
斯拉夫文、阿拉伯文或日文字元。

頁面頂端

選擇開啟檔案時的編碼標準

當您開啟檔案時,若文字顯示成亂碼、問號或方塊,表示 Word 未正確地偵測到檔案中文字的編碼標


準。您可以指定用以顯示 (解碼) 文字的編碼標準:

1. 按一下 [檔案] 索引標籤。

2. 按一下 [選項]。

3. 按一下 [進階]。

4. 捲動到 [一般] 區段,然後選取 [開啟舊檔時確認格式轉換] 核取方塊。

附註: 選取這個核取方塊後,每次您使用 Word 格式 (Word 格式包括


.doc、.dot、.docx、.docm、.dotx 或 .dotm 檔案) 以外的格式開啟檔案時,Word 都會顯示 [轉換
檔案] 對話方塊。如果您經常使用這種檔案,但不想每次都要選擇編碼標準,請記得關閉這個選
項,避免這個對話方塊不必要地開啟。

5. 關閉再重新開啟檔案。

6. 選取 [轉換檔案] 對話方塊中的 [編碼文字]。

https://support.office.com/zh-tw/article/在開啟及儲存檔案時選擇文字編碼方式-60d59c21-88b5-4006-831c-d536d42fd861[6/12/2016 8:10:09 PM]


在開啟及儲存檔案時選擇文字編碼方式 - Word

7. 選取 [檔案轉換] 對話方塊中的 [其他編碼方式],然後從清單中選取您要的編碼標準。

您可以在 [預覽] 區域中預覽文字,檢查使用您選取的編碼標準的所有文字是否可讀。

如果幾乎所有文字看起來都一個樣 (例如,都是方塊或都是句號),可能是沒有安裝顯示字元所需的字
型。如果沒有需要的字型,您可以安裝其他字型。

若要安裝其他字型,請執行下列動作:

1. 在 Microsoft Windows 中,按一下 [開始] 按鈕,再按一下 [控制台]。

2. 請執行下列其中一項操作:

在 Windows 7 中

a. 按一下 [控制台] 中的 [解除安裝程式]。

b. 在程式清單中,視安裝的 Word 屬於 Office 的一部分或為獨立的程式而按一下 Microsoft


Office 或 Microsoft Word 項目,然後再按一下 [變更]。

在 Windows Vista 中

a. 在 [控制台] 中,按一下 [解除安裝程式]。

b. 按一下列在程式清單中的 Microsoft Office 或 Microsoft Word 項目 (視您將 Word 安裝為 Office


的一部分或是個別安裝而定),再按一下 [變更]。

在 Microsoft Windows XP 中

a. 在 [控制台] 中,按一下 [新增或移除程式]。

b. 在 [目前安裝的程式] 方塊中,按一下 Microsoft Office 或 Microsoft Word (視您將 Word 安裝為


Office 的一部分或是個別安裝而定),再按一下 [變更]。

3. 按一下 [變更您的 Microsoft Office 安裝] 底下的 [新增或移除功能],然後按一下 [繼續]。

4. 展開 [安裝選項] 底下的 [Office 共用的功能],再展開 [多語系支援]。

5. 選取您需要的字型集,按一下您選取的項目旁邊的箭號,然後選取 [從我的電腦執行]。

提示: 當您開啟編碼文字檔時,Word 會套用定義在 [Web 選項] 對話方塊中的字型 (若要存取 [Web 選


項] 對話方塊,請按一下 [Office 按鈕],然後按一下 [Word 選項],再按一下 [進階]。接著按一下 [一般]
區段中的 [Web 選項])。在 [Web 選項] 對話方塊中,您可以選取 [字型] 索引標籤上的選項,以自訂每
個字元集的字型。

頁面頂端

https://support.office.com/zh-tw/article/在開啟及儲存檔案時選擇文字編碼方式-60d59c21-88b5-4006-831c-d536d42fd861[6/12/2016 8:10:09 PM]


在開啟及儲存檔案時選擇文字編碼方式 - Word

儲存檔案時選擇編碼標準

如果您在儲存檔案時沒有選擇編碼標準,Word 會將檔案編碼成 Unicode。一般而言,您可以使用預設


的 Unicode 編碼方式,因為它支援大部分語言中大部分的字元。

如果您的文件會在不支援 Unicode 的程式中開啟,您可以選擇符合目標程式的編碼標準。例


如,Unicode 可讓您在英文系統上建立繁體中文文件,不過,如果這份文件會在不支援 Unicode 的繁
體中文程式中開啟,您就可以使用繁體中文 (Big5) 編碼方式來儲存文件。當文件在繁體中文程式中開
啟時,所有文字都會正確顯示。

附註: 因為 Unicode 是最通用的標準,使用任何其他編碼方式來儲存文字可能會造成無法再顯示某些字


元。例如,使用 Unicode 編碼的文件可能包含了希伯來文及斯拉夫文,如果這份文件是以斯拉夫文
(Windows) 的編碼方式儲存,就無法再顯示希伯來文;如果文件是以希伯來文 (Windows) 的編碼方式
儲存,就無法再顯示斯拉夫文。

如果您選擇的編碼標準不支援檔案中所使用的字元,Word 會以紅色標示它無法儲存的字元。您可以
在儲存檔案之前,先預覽以您選擇的編碼標準進行編碼的文字。

以編碼文字方式儲存檔案時,會從檔案中移除以符號字型或以功能變數代碼格式化的文字。

選擇編碼標準

1. 按一下 [檔案] 索引標籤。

2. 按一下 [另存新檔]。

如果您要將檔案儲存在其他資料夾中,請找出並開啟那個資料夾。

3. 在 [檔案名稱] 方塊中,輸入檔案的新名稱。

4. 選取 [檔案類型] 方塊中的 [純文字]。

5. 按一下 [儲存]。

6. 如果出現 [Microsoft Office Word 相容性檢查程式] 對話方塊,按一下 [繼續]。

7. 在 [檔案轉換] 對話方塊中,選取您要使用的編碼標準選項:

若要使用系統預設編碼標準,請按一下 [Windows (預設值)]。

若要使用 MS-DOS 編碼標準,請按一下 [MS-DOS]。

若要選擇特定編碼標準,按一下 [其他編碼方式],然後從清單中選取您要的編碼標準。您可
以在 [預覽] 區域中預覽文字,檢查使用您選取的編碼標準的所有文字是否可讀。

https://support.office.com/zh-tw/article/在開啟及儲存檔案時選擇文字編碼方式-60d59c21-88b5-4006-831c-d536d42fd861[6/12/2016 8:10:09 PM]


在開啟及儲存檔案時選擇文字編碼方式 - Word

附註: 您可以調整 [檔案轉換] 對話方塊的大小,以便預覽較大的文件範圍。

8. 如果收到訊息,指出「紅色標示的文字將不會以選擇的編碼方式正確地儲存」,您可以試著選
擇其他編碼方式,或是選取 [允許字元替代] 核取方塊。

當您允許字元替代時,Word 會以您選擇的編碼方式中最接近的對等字元來取代無法顯示的字
元。例如,會以三個點取代省略符號、以雙引號取代大括號。

如果紅色標示的字元在您選擇的編碼方式中沒有對等的字元,紅色標示的字元就會儲存為與內
容無關的字元,例如引號。

9. 如果文件會在不自動換列的程式中開啟,您可以在文件中加入強制分行符號:只需選取 [插入分
行符號] 核取方塊,然後在 [行尾字元] 方塊中指定是要以輸入鍵符號 (CR)、換行字元 (LF) 或兩者
來描述分行符號。

頁面頂端

查詢 Word 中可用的編碼標準

Word 可以辨識好幾種編碼標準,並且支援電腦系統軟體所提供的編碼標準。

下列文字系統清單將列出與每一種文字系統相關聯的編碼標準 (也稱為字碼頁)。

文字系統 編碼標準 套用字型

多語系 Unicode (UCS-2 小端及大端、UTF- 預設字型依據您 Word 語言版本的 [內


8、UTF-7) 文] 樣式而有所不同

阿拉伯文 Windows 1256、ASMO 708 Courier New

簡體中文 GB2312、GBK、EUC-CN、ISO-2022- SimSun


CN、HZ

繁體中文 BIG5、EUC-TW、ISO-2022-TW 細明體

斯拉夫文 Windows 1251、KOI8-R、KOI8- Courier New


RU、ISO8859-5、DOS 866

https://support.office.com/zh-tw/article/在開啟及儲存檔案時選擇文字編碼方式-60d59c21-88b5-4006-831c-d536d42fd861[6/12/2016 8:10:09 PM]


在開啟及儲存檔案時選擇文字編碼方式 - Word

英文、西歐或其 Windows 1250、1252- Courier New


他拉丁文字 1254、1257、ISO8859-x

希臘文 Windows 1253 Courier New

希伯來文 Windows 1255 Courier New

日文 Shift-JIS、ISO-2022-JP (JIS)、EUC-JP MS Mincho

韓文 Wansung、Johab、ISO-2022- Malgun Gothic


KR、EUC-KR

泰文 Windows 874 Tahoma

越南文 Windows 1258 Courier New

印度語系:坦米 ISCII 57004 Latha


爾文

印度語系:尼泊 ISCII 57002 (梵文字母) Mangal


爾文

印度語系:貢根 ISCII 57002 (梵文字母) Mangal


印度語系:印度 ISCII 57002 (梵文字母) Mangal


印度語系:阿薩 ISCII 57006


姆文

印度語系:孟加 ISCII 57003

https://support.office.com/zh-tw/article/在開啟及儲存檔案時選擇文字編碼方式-60d59c21-88b5-4006-831c-d536d42fd861[6/12/2016 8:10:09 PM]


在開啟及儲存檔案時選擇文字編碼方式 - Word

拉文

印度語系:古吉 ISCII 57010


拉特文

印度語系:坎那 ISCII 57008


達文

印度語系:馬來 ISCII 57009


亞拉姆文

印度語系:歐利 ISCII 57007


亞文

印度語系:馬拉 ISCII 57002 (梵文字母)


提文

印度語系:旁遮 ISCII 57011


普文

印度語系:梵文 ISCII 57002 (梵文字母)

印度語系:特拉 ISCII 57005


古文

附註: 

使用印度語系的系統必須能夠支援適當的 OpenType 字型。

支援僅限於尼泊爾文、阿薩姆文、孟加拉文、古吉拉特文、馬來亞拉姆文及歐利亞文。

頁面頂端

https://support.office.com/zh-tw/article/在開啟及儲存檔案時選擇文字編碼方式-60d59c21-88b5-4006-831c-d536d42fd861[6/12/2016 8:10:09 PM]

You might also like