So what I'm trying to do is to strip every character in a string except from the first one, in a parameter.
This is the closest I've found so far but it doesn't work the same way.
C:\vbackup.bat test e: c:\temp
@echo off
IF /I NOT "%2" == "c:" (
:echo %%2:~0,1% // I personally prefer this since it will only be used once
:: Test
SET var=%2
SET var2=%var:~0,1%
CALL :show "0,1"
echo.
echo Backing up entire %2 to %3\%1
echo.
pause
exit
)
:show
echo Test : var=%var% var2=%var2%
GOTO :eof
Result:
Test : var=e: var2=~0,1