CALL (239) 961-8285
ENDURTECH
  • Web Services
    • Web Design
      • Design and Development
      • Web Consulting and Tutoring
      • Hosting and Maintenance
      • Project Portfolio
    • Media
      • Photo and Audio, Video Editing
      • Social Media Management
      • All Web Related Services
    • Marketing
      • Digital Marketing and Branding
      • Search Engine Optimization
    • Client Portal
      • Remote Web Support
      • Web Services Payment
      • Scheduled Payments
  • Tech Support
    • Services
      • Computer Support and Repair
      • Data Backup and Recovery
      • Computer Security, Virus Removal
      • Computer Networking Support
      • Computer Consulting & Tutoring
      • All Technology Related Services
    • Blockchain
      • Blockchain Technology
      • Cryptocurrency Articles
    • Client Portal
      • Remote PC Support
      • Remote Monitoring & Management
      • Tech Services Payment
  • Articles
  • About
  • Talk to Me
  • Menu Menu

How to Generate a List of Filenames in a Directory on Windows

Microsoft, Technology Support, Windows

Occasionally, you might want to print or save a list of the files in a folder.

While Windows 11 doesn’t offer a built-in feature for this through its graphical interface, there are several easy ways to accomplish it—whether you want a quick inventory, a printable list, or a saved record for work or backup purposes.

In this guide, I’ll walk you through three methods:

  • Using PowerShell or Command Prompt
  • Adding a right-click context menu option via the Registry
  • Using downloadable registry hacks for one-click setup

 

Method 1: Use PowerShell or Command Prompt

This is the simplest and most flexible way to generate a file list.

Step-by-Step Instructions

  • Open PowerShell or Command Prompt:
    • Navigate to the folder you want to list.
    • Right-click inside the folder and select “Open in Terminal” or “Open PowerShell window here.”
  • Run the following command:

dir > filename.txt

  • This creates a file named filename.txt in the same folder, containing a full directory listing.
  • Prefer a cleaner list with just filenames? Use this instead:

cmd /r dir /b > filename.txt

  • or in Command Prompt:

dir /b > filename.txt

  • The /b switch outputs only the filenames, one per line.

 

Method 2: Add a Right-Click Option to Copy File List

If you frequently need file lists, you can add a custom command to your right-click context menu.

Warning: Editing the Windows Registry can be risky. Always back up your registry and system before making changes.

Add the Context Menu Option

  • Press Win + R, type regedit, and press Enter then navigate to:

HKEY_CLASSES_ROOT\Directory\shell

  • Right-click the shell key → New > Key → name it copylist.
  • Select the new copylist key and double-click the (Default) value.
    • Set it to: Copy File List to Clipboard
  • Right-click copylist → New > Key → name it command.
  • Select the command key and double-click the (Default) value.
    • For a simple list of filenames:

cmd /c dir “%1” /b /a:-d /o:n | clip

  • For a detailed list (name, size, date):

cmd /c dir “%1” /a:-d /o:n | clip

  • Close Registry Editor.

Now, right-click any folder and select “Copy File List to Clipboard.” Paste it into Notepad, Excel, or anywhere else.

 

Method 3: Use One-Click Registry Hacks

If you’d rather not edit the Registry manually, you can use pre-made .reg files:

  • Copy Simple File Names to Clipboard
  • Copy File Names and Details to Clipboard
  • Remove Copy File Commands from Context Menu

These files automate the registry changes described above. Just double-click the one you want and follow the prompts.

Tip: You can create your own .reg files by exporting the modified keys from Registry Editor.

 

Conclusion

Whether you’re organizing files, documenting software, or just curious about what’s in a folder, generating a list of filenames in Windows 11 is easier than it seems.

This article provided you with quick PowerShell commands to a custom right-click options, giving you multiple tools at your disposal.

I welcome your thoughts, questions or suggestions on my article on how to generate a list of directory filenames on Windows.

You may support my work by sending me a tip using your Brave browser or by sending me a one time donation using your credit card.

Let me know if you found any errors within my article or if I may further assist you by answering any additional questions you may have.

 

November 10, 2023
Share this entry
  • Share on Facebook
  • Share on X
  • Share on WhatsApp
  • Share on LinkedIn
  • Share on Reddit
  • Share by Mail
https://endurtech.com/wp-content/uploads/2018/04/windows.jpg 512 512 Manny https://endurtech.com/wp-content/uploads/2018/04/endurtech-logo.png Manny2023-11-10 13:36:442025-11-13 16:52:41How to Generate a List of Filenames in a Directory on Windows
Search Search

CONNECT WITH US

This field is for validation purposes and should be left unchanged.
Engagement*

Want to say, "thanks"?
Leave me a review on Facebook and/or Google.

You can send me a tip using your Brave browser. Get Brave!

Only used to send you a receipt.
Include a Message
Popular
  • Windows Logo
    Second Monitor on Windows 10 Resets After SleepJuly 2, 2020 - 6:30 am
  • Windows Logo
    How to Disable the F1 Help Key in Windows 10April 15, 2021 - 2:40 pm
  • Cortana Logo
    How to Disable Microsoft’s CortanaApril 6, 2021 - 9:00 am
  • Firefox Logo
    How to Remove All Passwords from Lockwise in FirefoxMarch 26, 2020 - 11:00 am
Recent
  • How to block Facebook crawler
    List of Spider Crawlers to BlockOctober 13, 2026 - 8:50 am
  • How to Fix Brother BrLog Errors
    How to Fix Brother BrLog ErrorsAugust 24, 2026 - 10:55 am
  • Brave Browser Logo
    How to Fix the “Not Secure” Address Bar Err...July 20, 2026 - 12:48 pm
  • Linkpull Extension By Endurtech
    LinkPull Extension, Grab Any File From a URLJuly 7, 2026 - 7:35 pm

STAY IN TOUCH

ENDURTECH Web Design Company Naples, Florida

Endurtech GitHub ProfileEndurtech YouTube ChannelEndurtech LinkedIn ProfileEndurtech Facebook Page

5 Star Google Review for Endurtech - Naples Web Design Company

Learn More & Connect

Search Search
ENDURTECH Logo
Endurtech GitHub ProfileEndurtech YouTube ChannelEndurtech LinkedIn ProfileEndurtech Facebook Page

5 Star Google Review for Endurtech - Naples Web Design Company

Latest Articles

  • How to block Facebook crawler
    List of Spider Crawlers to BlockOctober 13, 2026 - 8:50 am
  • How to Fix Brother BrLog Errors
    How to Fix Brother BrLog ErrorsAugust 24, 2026 - 10:55 am
  • Brave Browser Logo
    How to Fix the “Not Secure” Address Bar ErrorJuly 20, 2026 - 12:48 pm
  • Linkpull Extension By Endurtech
    LinkPull Extension, Grab Any File From a URLJuly 7, 2026 - 7:35 pm

Recent Projects

  • Jewelry Website Gems of Note
    Gems of NoteNovember 15, 2019 - 10:16 pm
  • Gift Store Facebook Business Page Cover Video
    Gift Store Facebook Business Page Cover VideoApril 13, 2019 - 3:58 pm
  • Toledo Yoga BrandBot Footer Integration
    Toledo YogaApril 9, 2019 - 7:26 am
  • Lawyer Association Website with Member Portal
    National Employment Lawyers Association, Florida ChapterFebruary 26, 2019 - 8:00 am

Business Details

Mondays - Fridays
9:00 am - 5:00 pm
Eastern Standard Time
After hours by appointment

SUPPORT PHONE

(239) 961-8285

MAILING ADDRESS

59 Logan Ln.
Lynchburg, VA 24502

Copyright © 2026 ENDURTECH ® All Rights Reserved. Legal
Link to: Convert PC to VM on Hyper-V Link to: Convert PC to VM on Hyper-V Convert PC to VM on Hyper-VConvert PC to VM on Hyper-V Link to: Enable Developer Mode on Android Phones Link to: Enable Developer Mode on Android Phones Android Apps ScreenshotEnable Developer Mode on Android Phones
Scroll to top Scroll to top Scroll to top