You can export a folder's file names to Excel in about two minutes without any extra software: open File Explorer (Windows) or Finder (macOS), select the files, copy them, and paste into Excel — the file names land in one column. If you want more detail (size, date modified, path), use the address-bar route or a one-line command that generates a CSV you can open in Excel. Everything below uses built-in tools only, so nothing needs installing.
What You'll Need
- A Windows PC or Mac with Excel installed (the free Excel for the web also works, with limits on some pasting options).
- The folder you want to list — ideally a copy or a folder you don't mind changing, since some methods create a temporary file inside it.
- For the command-line method on Windows: no extra tools, just Command Prompt or PowerShell, which ship with Windows.
- Permission to read the folder. Network shares and cloud-synced folders can behave differently from local ones.
A note on menus: button names and menu labels vary slightly between Excel versions, Windows versions and macOS releases, so if a label you see differs from the one below, look for the nearest equivalent.
Step-by-Step
Method 1: Copy from File Explorer or Finder (fastest for names only)
- Open the folder in File Explorer (Windows) or Finder (macOS).
- Press Ctrl+A (Windows) or Cmd+A (Mac) to select every file. To include only some, hold Ctrl (Windows) or Cmd (Mac) and click each file. This selects files, not subfolders' contents — see the note below.
- Press Ctrl+C (Windows) or Cmd+C (Mac) to copy.
- Open Excel and click the first cell where you want the list, such as A1.
- Paste with Ctrl+V (Windows) or Cmd+V (Mac). On Windows you get one column of file names. On macOS you may get the name plus other columns depending on the view; delete unwanted columns.
- Save the workbook as .xlsx.
This method lists only the top level of the folder you opened. Files inside subfolders are not included unless you repeat the process for each one.
Method 2: The address-bar trick (names as text, no metadata)
- Open the folder in File Explorer.
- Click the address bar at the top, type the word cmd and press Enter. A Command Prompt window opens already pointed at that folder.
- Type
dir /b > filelist.txtand press Enter. The/bswitch gives bare names without headers or sizes, and the output is written tofilelist.txtin the same folder. - Open
filelist.txtin Notepad, select all, and copy. - Paste into Excel. Use Data > Text to Columns if everything lands in one cell.
- Delete
filelist.txtafterwards if you don't want it left in the folder.
For subfolders as well, use dir /b /s > filelist.txt. The /s switch includes every subfolder and prints full paths.
Method 3: Rich details such as size and date modified (Windows)
- Open the folder in File Explorer and press Ctrl+A.
- Hold Shift, then right-click the selection and choose Copy as path. This copies the full path of each selected file, one per line, in quotes.
- Paste into Excel and use Find and Replace (Ctrl+H) to remove the surrounding quote marks.
- If you want size or date columns instead, switch the folder view to Details, then select all and copy; Windows can paste the visible columns into Excel in some versions. If the columns don't come through, paste the paths instead and keep the extra detail in File Explorer.
Method 4: Clean up and finish in Excel
- In Excel, select the pasted column and use Data > Text to Columns if the names arrived merged.
- Add a header in row 1, such as File Name.
- Turn the range into a table with Ctrl+T so it sorts and filters cleanly.
- Optional: select the header and choose Data > Filter to sort by name or by extension.
- Save as .xlsx, not .csv, if you want formatting and formulas kept.
On macOS, Finder's copy gives names as plain text; paste into Excel and use Data > Text to Columns with the separator Finder inserted (often a tab) if the names land in a single cell. Finder has no built-in option to add size or date columns, so for those use a Terminal command such as ls -lh redirected to a text file, then import it.
Common Mistakes
- Expecting subfolders to be included. Standard copy or
dir /bonly lists the current folder; add/s, or repeat per folder. - Losing the file extension. By default Windows hides known extensions in File Explorer, so names appear without .docx or .jpg. Turn on View > File name extensions (or Show > Show All Filename Extensions in Finder on Mac) before copying if extensions matter.
- Pasting into a merged or formatted cell. Paste into a clean sheet area first, then move the data.
- Leaving the helper file behind.
filelist.txtends up inside the very folder you were listing, so delete it or it appears in future exports. - Saving as CSV after sorting with formulas. CSV drops formulas, formatting and multiple sheets.
Tips
- For a repeatable list, build a small macro or script later; for one-off jobs the copy method is faster than scripting.
- Sort the folder by name, date or type before you select and copy — that order is preserved in the paste.
- Add a column next to the names for notes, owner or status; it turns a file dump into a usable inventory.
- Use Excel's filter with the file extension (for example
.pdf) to group documents by type quickly. - If you only need to count files, the folder status bar in File Explorer shows the number selected.
Troubleshooting
The paste puts everything in one cell. Use Data > Text to Columns, choose Delimited, and pick the separator that appears between names (tab, comma or semicolon).
Nothing pastes at all. Excel sometimes copies a picture of the selection instead of text, or the clipboard got cleared. Re-copy from File Explorer, make sure a single cell is selected (not a range), and use Paste Special > Text if offered. Signing out and back in to Windows clears a stuck clipboard.
The command prompt says access denied. The folder may be read-only or on a network location where writing is blocked. Copy the folder to a local, writable location, or paste the file list into a workbook saved elsewhere.
Names look truncated or show short names. File Explorer can display elided names in narrow columns; widen the column or switch to Details view before copying.
Files are missing from the list. Hidden and system files are not selected by Ctrl+A. Show hidden items in File Explorer's View menu (the exact wording varies by version) if you need them, and remember that a long list in a scrolling window may copy only what is fully rendered — scroll through once before copying.
Frequently Asked Questions
Can I export file names without any software?
Yes. Copy and paste from File Explorer or Finder into Excel covers most cases, and the address-bar cmd route needs nothing beyond Windows itself.
How do I include files from subfolders?
Use dir /b /s > filelist.txt in Command Prompt, or run the copy per folder. Plain Ctrl+A does not reach into subfolders.
Why do the file extensions not appear?
Windows hides known extensions by default. Turn on File name extensions in the View menu before copying, or include them deliberately afterwards.
Does this work on a Mac the same way?
Copying in Finder pastes names as text, but there is no built-in way to add size or date columns. Use Terminal commands such as ls and import the output if you need those.
Can I update the list automatically when files change?
Not with the copy method — it is a snapshot. For repeated exports you would need a script or macro that re-runs the command and imports the result.
Will it work with cloud or network folders?
Usually the copy method works if the folder is synced locally. Command-line writes may fail on read-only shares, so run the command on a local copy instead.