get filename without extension in BAT (Users)
> In which OS _does_ it work correctly ?
freedos (default)
> Please elaborate on exactly what you are trying to do
> and what the _expected_ result should be.
It is necessary to send a text file to the BAT parameter of the file and get its name without the extension , because the EXE file will be compiled from this text file. The name of this EXE is required to run. On other systems, this is not a problem, but on DOS the COMMAND.com interpreter is very simple and it does not seem to be able to get part of a filename in a simple way.
> That is NT's CMD.EXE, not DOS' COMMAND.COM.
I have already understood that DOS COMMAND.COM cannot do this without third-party tools. For some reason, some sites wrote that it works in DOS...
I found an alternative way: pass one more parameter to the BAT file, where I will specify the exact name.
Thanks everyone for the replies!
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