---
title: "Get all filenames from a folder"
description: "Sometimes you need to get a list with all the filenames and extensions to do a batch processing. What if there are 1000+ files in a folder ? Well, there is an easy way to get that list in just 10..."
url: https://blogdeit.ro/get-all-file-names-from-a-folder
date: 2013-12-04
modified: 2021-07-20
author: "Radu Popescu"
image: https://blogdeit.ro/wp-content/uploads/2018/11/vdi-default-featured-code.png
categories: ["Tutorial"]
tags: ["cmd", "dos", "filename", "windows"]
type: post
lang: en
---

# Get all filenames from a folder

Sometimes you need to get a list with all the filenames and extensions to do a batch processing. What if there are 1000+ files in a folder ? Well, there is an easy way to get that list in just 10 seconds. If you are using Windows as an OS here is a short tutorial on how to get all the filenames in a text file.

1. Open the Command Prompt (you can use Win + R shortcut)
2. Go to the folder you would like to get all filenames
3. Use the following commands

- Get all file and folder names :* ****DIR /B /O:N > filename.txt ***

- Get all file, folder names even from subfolders :* ****DIR /B /O:N /S > filename.txt ***
