Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting FileName without the complete path 1

Status
Not open for further replies.

mlapse

IS-IT--Management
Jun 30, 2005
82
US
Hi,

I have a requirement where I would like to get the filename of the input file without the path.

Ex: if the file path returned from GETFILENAME is C:\apps\mercator\example.txt, I want to put example.txt in the output.

How can i do this?

Thanks
 
I have been able to do this successfully. Thanks a lot !
 
OK, what did you do? There is more than one way to do this.


JuJutsu - Jeff S.
Support Analyst
 
What I did was:

SUBSTITUTE(GETFILENAME(Filename), GETDIRECTORY(Filename), "")

It worked fine. Is there something I could have done to make it easier.
 
WORD(GETFILENAME(Filename),"\",-1) works great
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top