I have the following batch script from Wikipedia:
@echo off
for /R "C:\Users\Admin\Ordner" %%f in (*.flv) do (
echo %%f
)
pause
In the for-loop all files with the extension flv get echoed,
but I want the make some actions with the file(s)
where I need one time the file without the extension and one time with the extension.
How could I get these two?
I searched for solutions but I don't find one.
I'm a real newbie in batch…
Best Answer
You can use
%%~nf
to get the filename only as described in the reference forfor
:The following options are available: