
06-27-2005, 07:19 AM
|
|
Regular
|
|
Join Date: Nov 2003
Posts: 69
|
|
How to trunicate string from right to left
|
All,
I need to know how to trunicate a string from right to left, until I hit a specified character.
Example:
I have a program that looks at a specific server, and then reports the installed directory from where the service runs. It returns a value of something like this:
C:\Service\Servicename.exe
I need to be able to remove the Servicename.exe (basically walk the string backward until i Hit the "\".
This is so I can backup files located in that specific directory which the service is located. The installation directory can be different, so I cannot hard code this string..
Does anyone know how to do this?
TIA
Drum on .. .. . . .
|
|