Yes, you can easily export the contents of a folder in Windows File Explorer (Windows 10/11) to Excel—no third-party tools needed. The method works with any folder, and you’ll get a clean, sortable spreadsheet with filenames, dates modified, and even file sizes. Here’s how.
What You'll Need
- A Windows PC (Windows 10 or 11)
- File Explorer open to the folder you want to export
- Microsoft Excel (or Google Sheets; see notes below)
- Right-click mouse (or trackpad equivalent)
- (Optional) A text editor like Notepad to preview hidden files if needed
Step-by-Step
-
Open File Explorer:
Press
Win + Eor click the folder icon in the taskbar. Navigate to the folder you want to export. If the folder has subfolders, you can export just the top-level items or include all recursively. See "Recursive Export" below. -
Select the files and folders:
Hold
Ctrl(for individual items) orShift(for a range), then click each item to select it. For all items in the current view: right-click anywhere in the folder list** and chooseSelect Allfrom the context menu. Note: This works for the visible items on screen; hidden files may not appear. If needed, openView > Show > Hidden itemsfirst. -
Export to Excel:
In the selected items’ context menu, choose
Copy as > Text (CSV)** (not plain text—this preserves formatting). For older Windows versions (pre-2016), this option may appear asSave As > Text (CSV). A file will save to your Downloads folder (or the default location set in File Explorer). -
Open the CSV file in Excel:
Double-click the downloaded file. Excel will automatically open it. If the file opens as plain text instead,
File > Open, browse to the CSV, and selectBrowseto force Excel to read it. For Google Sheets, useFile > Import > Upload filefrom your computer. - Verify the data: Check the first few rows to ensure filenames, dates modified, and sizes appear. If you need to sort or filter later, this is already in a spreadsheet format.
Recursive Export (All Subfolders)
For folders with subfolders, you’ll need to:
1. Right-click the folder > Copy as > Text (CSV).
2. Open the downloaded CSV in Excel.
3. In Excel, use Data > Text to Columns to split filenames from subfolder paths.
4. Add a Paste Special > Values step to clean up duplicates.
Common Mistakes
-
Using plain text (TXT) instead of CSV: Plain text won’t preserve formatting or allow sorting. Always choose
Copy as > Text (CSV). -
Forgetting to select all items: Only visible items are copied. Use
Select Allfor quick bulk copying. -
CSV opens in Notepad: If the file opens as plain text instead of Excel, right-click the file >
Open With > Choose Default Program, then pickMicrosoft Excel(orGoogle Sheets). -
Hidden files aren’t included: Enable
View > Show > Hidden itemsto see system files. UseFilter > Extensionsto include all types.
Tips
-
Save time with shortcuts: Press
Ctrl + Ato select all items before copying. - Use Excel’s power tools: After importing, add columns for file size (in KB or MB) or dates by right-clicking the column headers.
- Exclude empty folders: Before exporting, delete any empty folders to reduce file size.
-
Sort before exporting: Right-click the folder >
Sort By > NameorSizeif you need organized results. -
Try bulk operations: For large folders, use
File Explorer > Sort by > Date Modified, then copy the top items (most recent) for quick exporting.
Troubleshooting
-
Excel won’t open the CSV:
- Check if the file is corrupted. Rename the
.csvextension to.txt, open it in Notepad, then copy the data back into Excel. - Update Excel to the latest version.
- Restart File Explorer: Press
Ctrl + Shift + Escto open Task Manager, findexplorer.exe, and restart it.
- Check if the file is corrupted. Rename the
-
No "Copy as CSV" option:
- This is common in older Windows versions (
Save As > Text (CSV)is an alternative). - Right-click the folder >
New > Text Document(create a dummy file), then paste your selection into it. Save as CSV.
- This is common in older Windows versions (
-
Recursive export fails:
- Use Excel’s built-in recursive tools:
Data > Get Data > From File > From Folder, then filter for your top-level folder. - Manually export each subfolder separately and merge in Excel.
- Use Excel’s built-in recursive tools:
Frequently Asked Questions
Why doesn’t my CSV open in Excel?
If the file opens in Notepad, it’s likely a plain text file instead of a CSV. Force Excel to open it by right-clicking the file > Open With, then choose Microsoft Excel. If that fails, rename the extension to .csv.txt and try again.
Can I export from macOS or Linux?
No, this method is Windows-specific. On macOS/Linux, use command-line tools like find or GUI apps like TreeSize to export folders to CSV.
How do I export just modified files?
Sort your folder by Date Modified (right-click > Sort By > Date Modified), then copy only the top items (most recent).
Does this method work for network drives?
Yes, if the network drive is accessible and permissions allow. The CSV export will work the same way.
How do I clean up duplicate filenames?
After importing to Excel, use the Remove Duplicates feature (Data > Remove Duplicates) to handle duplicates.
What if I only want a specific file type (e.g., .jpg)?
Enable Filter > Extensions, then right-click and select only files with the desired extension (e.g., .jpg). Copy those before exporting.
For advanced needs (like tracking file changes over time), consider using Excel’s Data > Get Data > From File and enabling Power Query to analyze history.