substring of a string...newbie question..

Posted by Admin on 23-Feb-2009 21:27

hi...i'm a real newbie to progress...i'm using 9.1d...what i'm trying to do in one of the program is to get a substring of a string....

i have used the 'entry' function to get rid of a file extension...for example getting rid of .doc from a file name...now what i have got is the file name, with the full path....i.e. v:\code\dev\file1

what i would like to do is get rid of v:\code\dev\ and be left with 'file1' only....anyone can suggest what method/function i use???

any help would be appreciated...

sayed

All Replies

Posted by deb2001 on 23-Feb-2009 21:57

just do like -

SUBSTRING(,"\") + 1)

this will give you the full file name without path, then whatever you want to do the extension with...

Reagrds

Posted by Stefan Drissen on 25-Feb-2009 16:24

I prefer using the ENTRY and NUM-ENTRIES functions:

cfile = ENTRY( NUM-ENTRIES( cfile, "\":U ), cfile, "\":U )

This thread is closed