CMD Q: I want to remove the extension of a filename.
It is actually a complete path, like C:/Me/My/Path/filename.xxxx
i know that the extension has 4 chars, like shown in example above.
How can i get rid of the extension?
Thanks.
CMD Q: I want to remove the extension of a filename.
It is actually a complete path, like C:/Me/My/Path/filename.xxxx
i know that the extension has 4 chars, like shown in example above.
How can i get rid of the extension?
Thanks.
In terminal:
set file=C:/Me/My/Path/filename.1234
for /F "tokens=*" %A IN ("%file%") DO @echo variable ^%file^%: %~dpnA
In batch file:
@echo off
set file=C:/Me/My/Path/filename.1234
echo If called with path as batch parameter: %~dpn1
for /F "tokens=*" %%A IN ("%file%") DO echo variable %%file%%: %%~dpnA