>#define CrLf chr(13)+chr(10) >* >cPath = node.FullPath >nLen = alines(aText,cPath,1,'\') >cOuTxt= '' >* >for nCnt = 1 to nLen > cOuTxt = cOuTxt + replicate('.',2*(nCnt-1)) + aText[nCnt] + iif(nCnt=nLen,'',CrLf) >endfor >return cOuTxt >>
>>lcIn = "Asset\Current Assets\Bank & Cash\Bank\HSBC" >>lcOut = '' >>FOR lnLine = 1 TO ALINES(laLines,lcIn,1,'\') >> lcOut = lcOut+SPACE(lnLine)+laLines(lnLine)+CHR(13)+CHR(10) >>ENDFOR &&lnLine >> >>?lcOut >>>>
>>>If fullpath is: >>>"Asset\Current Assets\Bank & Cash\Bank\HSBC" >>> >>>Output required: >>> >>>"Asset >>> Current Assets >>> Bank & Cash >>> Bank >>> HSBC" >>> >>> >>>If fullpath is: >>>"Asset\Current Assets\Bank & Cash\Bank" >>> >>>Output required: >>> >>>"Asset >>> Current Assets >>> Bank & Cash >>> Bank" >>> >>>and so on........... >>>>>>