get filename without extension in BAT (Users)
> 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 ???
Why not use instead a name without extension as input parameter and then work with %1.txt and %1.exe in batch file? I know it's not ideal when you use commandline auto completition utility that will automatically fill the whole name with extension. Or as suggested include sed from freedos or djgpp to your toolchain.
---
DOS gives me freedom to unlimited HW access.
Complete thread:
- get filename without extension in BAT - stabud, 03.05.2023, 07:51
- 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