PDA

View Full Version : Extract a path from another path with out slash


Soheyl
02-09-2006, 11:14 AM
I want extract this path:


C:\Documents and Settings\Soheyl\Application Data\MyFolder


from:


C:\Documents and Settings\Soheyl\Application Data\MyFolder\


i don't need "\"...
how can me?

I know must use "String.Min" and "Strin.ReverseFind"... but i cant!!!

Best Regards;

Soheyl

TJ_Tigger
02-09-2006, 11:17 AM
you can try this


sPath = C:\Documents and Settings\Soheyl\Application Data\MyFolder\
if String.Right (sPath, 1) == "\\" then
sPath = String.TrimRight(sPath, "\\");
end


Tigg

Soheyl
02-09-2006, 02:32 PM
Dear TJ_Tigger;
thanks;

:yes