
コマンドプロンプトを使って、ファイル名やフォルダ名を取得する方法です。
パソコン操作が得意ではない場合は他の方法を試してみてください。
目次
コマンドプロンプトを起動する
(1)キーボードの「Windowsロゴ」キーを押してから、「R」キーを押します。
→「ファイル名を指定して実行」が起動します。
’(2)テキストボックス内に「cmd」と入力し、「Enter」キーを押します。

cd /d f:
フォルダ内のファイル名とフォルダ名をメモ帳に書き出す
- 名前を取得したいフォルダはドライブ割り当てをしている「F:¥sample」
- 名前を書き出すファイル名は「ichiran.txt」の場合
- 「ichiran.txt」は同じフォルダ内に保存する

フォルダ名とファイル名
(1)コマンドプロンプトを起動し、フォルダ名とファイル名を取得したいフォルダへ移動します。

次のように入力しても移動できます。
cd /d f:/sample
(2)「dir /b > ichiran.txt」と入力し、Enterキーを押します。
dir /b > ichiran.txt
保存されたファイルを確認するとフォルダ名とファイル名が書き出されています。

フォルダ名またはファイル名
フォルダ名のみ書き出したい場合
dir /b /ad > ichiran.txt
ファイル名のみ書き出したい場合
dir /b /a-d > ichiran.txt