get filename without extension in BAT (Users)
> echo "%~n1"
->>> does not work in freedos
That is NT's CMD.EXE, not DOS' COMMAND.COM. Maybe HXDOS would work?
> How to get file C:\test from file C:\test.txt ???
Since FreeDOS comes with sed (at least, my install did):
echo %1 | sed -r s/^(.*)\..*/\1/ | set /p filename=
Complete thread:
- get filename without extension in BAT - stabud, 03.05.2023, 07:51 (Users)
- get filename without extension in BAT - glennmcc, 04.05.2023, 02:47
- get filename without extension in BAT - stabud, 04.05.2023, 04:35
- get filename without extension in BAT - glennmcc, 04.05.2023, 17:09
- get filename without extension in BAT - ecm, 04.05.2023, 17:57
- get filename without extension in BAT - glennmcc, 04.05.2023, 17:09
- get filename without extension in BAT - stabud, 04.05.2023, 04:35
- get filename without extension in BAT - jadoxa, 04.05.2023, 03:08
- get filename without extension in BAT - RayeR, 06.06.2023, 13:59
- get filename without extension in BAT - glennmcc, 04.05.2023, 02:47