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 glennmcc Homepage E-mail, North Jackson, Ohio (USA), 04.05.2023, 02:47

> Hi All!
>
> When specified on the command line: test.bat C:\test.txt
>
> echo %1 ->>> ok!! Filename
> echo "%~n1" ->>> does not work in freedos
>
> How to get file C:\test from file C:\test.txt ???

Please elaborate on exactly what you are trying to do
and what the _expected_ result should be.

In which OS _does_ it work correctly ?

---
--
http://glennmcc.org/

 

Complete thread:

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