The following code will split a string with N number of substrings with # separated values. You can use any delimiter
@echo off
if "%1" == "" goto error1
set _myvar="%1"
:FORLOOP
For /F "tokens=1* delims=#" %%A IN (%_myvar%) DO (
echo %%A
set _myvar="%%B"
if NOT "%_myvar%"=="" goto FORLOOP
)
goto endofprogram
:error1
echo You must provide Argument with # separated
goto endofprogram
:endofprogram