Is there a way to take substrings of a string with .bat/.cmd files?
For example given the string ‘hello.txt’ is there a way to strip the .txt?
EDIT: Also is there a more general way to do this, not under the assumption that it is a file name or file path?
If this is a file passed as a parameter, you can use %~n1, like this:
If you know the length of the string you can use the substring operator:
And to get everything EXCEPT the last 4 characters: