I need to split a string in a batch file using a word for delimiter.
For example if I have an input like :
C:\Dir1\Dir2\Dir3\File.c
I'd like to split it considering the word "Dir2" so that I get in output :
Dir2\Dir3\File.c
Note that the number of parent/children directories of Dir2 cannot be known before processing.
I've tried with for /f
but it does not work as it does not accept delimiters with several characters but only single characters.