# Dos command



## swathi (Oct 17, 2004)

Hi,
I have to write a batch file that gets substring within a string(the string is not given as a parameter to the batch file).
the substring will be the last part of the string after last slash(there might be any number of slashes in the string).
so i have to know the last / in the string so that i can get the remaining part into a variable.
I would really appreciate if anyone can help me to solve this.
Thank you.


----------



## dameon (Nov 5, 2004)

how will you enter your string to your batch file ?
Can you explain more ?


----------



## Squashman (Apr 4, 2003)

To bad you are not using Linux. This can be done so easily in a Bash Script.


----------



## Whiteskin (Nov 16, 2002)

Download bash for windows, and then read up on the bash scripting guide

http://tille.soti.org/training/bash/

http://home.wanadoo.nl/fvu/Projects/Bash/Web/bash.htm#h-1


----------



## ChuckE (Aug 30, 2004)

There are quite a number of batching enhancement tools around.
They have features that you can manipulate string inputs, searching for text to the left or the right of the end of the input string.
Some are free, some have a small charge.

One that is pretty good is "GET" Version 2.7 - Bob Stephan's Batch Enhancer
see: http://www.redshift.com/~bstephan/bs01000.htm

Version 2.8 is available but I believe you have to pay for the use of it (the honor system). However, v2.5 is freeware, and I think maybe v2.7 is also.


----------

