FG
💻 Software

How do I hide file extensions in a command prompt /dir output?

Fresh5 days ago
Mar 15, 202623958 views
Confidence Score0%
0%

Problem

What I want to do seems very simple: I have a folder in Windows containing items of various types including PDF files, TXT files, and subdirectories. I am writing a one line .bat file to pull ONLY the PDF file names into a new text file. So far this is what I have in the .bat: This gives the follow…

Error Output

dir *.pdf /b > PDF_LIST.txt

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How do I hide file extensions in a command prompt /dir output?

Low Risk

In your script:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment