Re: Extract filename from path
- From: "pop" <p_o_p@xxxxxxxxxxx>
- Date: Fri, 11 Nov 2005 20:05:02 GMT
fnam=ary(split(FILENAME,ary,"\\"));
print fnam;
--
pop is Mark
Doing nothing makes me tired 'cause I can't take a break.
--
"Jeroen Gouma" <Jeroen@xxxxxxxxxxxxxx> wrote in message
news:f149n152b8ndjtcua9rusj6eatno2ake19@xxxxxxxxxx
> Hi,
>
> How can I extract only the filename from the FILENAME variable,
> containing the complete path?
>
> i.e.:
> FILENAME = c:\test\input\data.txt
>
> I would like to have only data.txt in a variable.
>
> I was thinking on something like find the last \ in FILENAME and take
> a substr from there. But how to find the last \ if the lenght of the
> path can vary?
>
> Thanks a lot,
>
> Jeroen
.
- References:
- Extract filename from path
- From: Jeroen Gouma
- Extract filename from path
- Prev by Date: Re: Extract filename from path
- Next by Date: Re: generation of sequences
- Previous by thread: Re: Extract filename from path
- Next by thread: Re: Extract filename from path
- Index(es):
Relevant Pages
|