How to Copy or Import a Folder File List into Excel
Question details
The user needs to transfer a list of 138 file names from a local folder directly into an Excel worksheet, ensuring each file name occupies its own separate row.

- Product
- Microsoft Excel (Desktop and SharePoint)
- Device & OS
- not provided
- Scenario
- Attempting to copy multiple selected files directly from Windows File Explorer and pasting them into an Excel spreadsheet to create a text list.
- Observed behavior
- Pasting the copied files directly into Excel does nothing, failing to transfer the selected file names into individual rows.
Ensure all the files you want to list are gathered in a single folder. If you have hidden files in the directory, make sure you unhide them in File Explorer first so they are included in your selection.
Use the 'Copy as path' Feature in File Explorer
This is the quickest native Windows method to extract file names as text strings that can be successfully pasted into Excel.
When you select files and press Ctrl+C, Windows copies the actual file data, not the text names. Using 'Copy as path' forces Windows to copy the file directories as text strings to your clipboard.
Open Windows File Explorer and navigate to the folder containing your 138 files. Press Ctrl + A to select all files, or hold Shift to click and highlight the specific files you need.
In Windows 11, right-click the selected files and choose 'Copy as path' from the context menu. If you are using Windows 10, hold down the Shift key, right-click the selection, and click 'Copy as path'.
Open your Excel workbook, select the starting cell (e.g., A1), and press Ctrl + V. Each file path will now appear in its own individual row.
To keep only the file names, press Ctrl + H to open Find and Replace. Type the folder path (e.g., 'C:\Users\Name\Folder\') in the 'Find what' box, leave 'Replace with' blank, and click 'Replace All'.

Generate a Text List via a Web Browser
You can use a web browser like Chrome or Edge as a directory viewer to easily highlight and copy a clean list of file names.
Use Power Query to Extract Folder Data
For an automated and dynamic list that updates when files are added or removed, use Excel's 'Get Data' feature.
Easily Import and Format File Lists with WPS Spreadsheet
WPS Spreadsheet offers a seamless experience for pasting, organizing, and managing large datasets like folder directories. With built-in text processing tools, you can easily clean up imported file lists in seconds.
- 1. Copy file paths: Highlight your files in Windows File Explorer, hold Shift, right-click, and select 'Copy as path'.
- 2. Open WPS Spreadsheet: Launch WPS Office and create a new blank spreadsheet document.
- 3. Paste text cleanly: Select cell A1, right-click, and choose 'Paste Special' > 'Unformatted Text' to insert your list.
- 4. Remove directory paths: Press Ctrl + H to open the Replace tool. Enter your folder path in the 'Find' box, leave 'Replace' empty, and hit 'Replace All' to isolate the file names.

Frequently Asked Questions
Why did nothing happen when I pasted copied files into Excel?
When you copy files normally in File Explorer using Ctrl+C, Windows copies the actual file objects (binary data) to the clipboard. Excel expects text data for its cells. Since the clipboard contains objects rather than text strings, Excel ignores the paste command.
How can I remove the folder path and keep only the file name?
If you used the 'Copy as path' method, your list will look like 'C:\Folder\File.txt'. Highlight the column in Excel, press Ctrl + H to open 'Find and Replace', type 'C:\Folder\' in the 'Find what' field, leave 'Replace with' entirely blank, and click 'Replace All'.
Can I automatically export file details like size and date modified?
Yes. Instead of copying and pasting, use Excel's 'Get Data from Folder' feature (found under the Data tab). This Power Query tool automatically extracts the file name, extension, date accessed, date modified, file size, and exact folder path into neat, sortable columns.
Does the command prompt method still work for making file lists?
Yes. You can open Command Prompt, navigate to your folder using 'cd', and run the command 'dir /b > filelist.txt'. This will generate a text document inside your folder containing all the file names, which you can then open and copy into Excel.




