Subject |
Re: Getting Just the File Name from Getfile() |
From |
<rich@autotraker.com> <<rich@autotraker.com>> |
Date |
Wed, 23 May 2018 07:14:43 -0400 |
Newsgroups |
dbase.getting-started |
You got a few good answers.
However they should have embraced the new string methods rather than using
rat()
f = GETFILE("*Z*.xml","Select a File",.T.,"XML Files (*.xml)")
? f.right(f.length-f.lastIndexOf("\")-1)
"Louis James" wrote in message news:Dg0dwyj8THA.1832@ip-AC1E04A7...
Firstly assume that I am in the folder F:\Data\2018\03-2018
if I use getfile(), in the following example:
f = GETFILE("*Z*.xml","Select a File",.T.,"XML Files (*.xml)")
I will get on the return something like:
f = F:\Data\2018\03-2018\04-23-2018 The Long FileName.xml
What I am interested in is JUST the filename without the path. In this
example:
04-23-2018 The LongFileName.xml
How do I strip out the path and just get the filename. Thank you for
helping.
Louis
|
|