logo
search
Data Import & Export

How to Copy or Import a Folder File List into Excel

WPS EditorWPS Editor Oct 10, 2026 869 views

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.

How to Copy or Import a Folder File List into Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the target files

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.

2
Copy the file paths

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'.

3
Paste into Excel

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.

4
Remove the folder path (Optional)

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'.

Use the 'Copy as path' Feature in File Explorer
Quick Formatting: Using Find and Replace instantly cleans up your list, leaving you with exactly 138 clean file names, extensions included.
Efficient Data Management

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. 1. Copy file paths: Highlight your files in Windows File Explorer, hold Shift, right-click, and select 'Copy as path'.
  2. 2. Open WPS Spreadsheet: Launch WPS Office and create a new blank spreadsheet document.
  3. 3. Paste text cleanly: Select cell A1, right-click, and choose 'Paste Special' > 'Unformatted Text' to insert your list.
  4. 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.
Fully compatible with Microsoft Excel formats (.xlsx, .xls) ensuring zero formatting loss.Built-in 'Text to Columns' and 'Find & Replace' tools make cleaning up file paths incredibly easy.Lightweight and optimized architecture prevents freezing when pasting massive text lists.Completely free to use with a highly familiar interface requiring no learning curve.
microsoft office alternative - wps office

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.