I have the file named: italo.jpeg
How to extract italo (before period) using:
set file=italo.jpeg
set prefix=%file:~[arguments]%
I've tried %file:~0,"."% but didn't work...
I have the file named: italo.jpeg
How to extract italo (before period) using:
set file=italo.jpeg
set prefix=%file:~[arguments]%
I've tried %file:~0,"."% but didn't work...
for /f "delims=." %%b in ("%file%") do set "prefix=%%b"
or, since this is a filename,
for %%b in ("%file%") do set "prefix=%%~nb"
Documentation : enter for /?
at the prompt.