im trying to split the strings. please find the details below,
Scenario:
set test1=“C:A\B\C\D\X\Y\Z”
set test2=“D:A\B\X\Y\Z”
echo %test1%
echo %test2%
i have to eliminate “\X\Y\Z” and i need the remaining string. expectation is it should print like below output
echo C:A\B\C\D
echo D:A\B
Thanks for reading this