I want to Get a filename with a specific extension from a directory. Then in a result, I want to get rid of the extension name.
enter code here
@echo off
for %%f in (*.pdf) do (
if "%%~xf"==".pdf" echo %%f
)
Let say in the directory the pdf files are (one.pdf, two.pdf, and three.pdf)
In the command above the results are
- one.pdf
- two.pdf
- three.pdf
my preferred results are:
- one
- two
- three
Thanks in Advance Ryl