This quick guide shows you how to get a plain-text list of files in a folder using Command Prompt or PowerShell on Windows. This is especially useful if:
- You need a quick inventory of files without third-party tools.
- You want to get a list of your installed mods.
- You’re sending file info to an AI tool or support for troubleshooting.
Option 1: Command Prompt (CMD)
- Open Command Prompt by pressing
Windows + R, typecmd, pressEnter.- you can also open it by right clicking the windows icon and selecting it from the context menu
- Tell command prompt to target the folder by typing cd “
C:The/Path/ToYour/Folder“. Then hit enter to run the command - Run this command to list files only:
dir /b /a-d✅ This shows only file names, no directories. - To list files from any folder without changing directory:
dir /b /a-d "C:\path\to\your\folder" - You’ll see a list of file names printed in the terminal.
Option 2: PowerShell
- Open PowerShell by pressing
Windows + R, typingpowershelland pressingEnter.- You can also right click the windows icon and launch powershell from the context menu
- Tell PowerShell to target the folder by typing cd “
C:The/Path/ToYour/Folder“. The hit enter to run the command - Next run the command
Get-ChildItem -File - The powershell window should display a list of your files and their details that you can copy and paste
To list file names only:
Get-ChildItem -File | Select-Object -ExpandProperty Name
To get full paths:
Get-ChildItem -File | Select-Object -ExpandProperty FullName
You can even save the list to a text file:
- Command prompt:
dir /b /a-d > filelist.txt - PowerShell:
Get-ChildItem -File | Select-Object -ExpandProperty Name | Out-File filelist.txt
