Last index of a character in an input string in a batch file
<p>I have a batch script running in windows. Every time the batch script is invoked an input path is provided as a parameter. I need to extract the folder name from the path.For that i need to get the last index of "/" from the path and then take a substring from that path until the end of the string. </p>

<p>Suppose I have a string /home/home1/home2/home3</p>

<p>The output I require is home3. Is there any way to extract the same.</p>