Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

get filename without extension in BAT (Users)

posted by stabud, 04.05.2023, 04:35

> 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:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 30 users online (0 registered, 30 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum