General information
Category:
Coding, syntax & commands
>I seem to recall a function that would return the filename if a a string if given the full path of the file. For example if given "C:\APPS\VFP\TEST.DBF" it would return "TEST.DBF". What is that function? Darned if I can recall.
Try This:
LParameter PcFileString && String Containing Path and FileName.
Local LcRetVal && Holds Return Value.
Local LnStringLength && Length of the string containing the file and path
Local LnSlashLocation && Location in PcFileString where the last '\' is.
LnStringLength = Len(PcFileString)
LnSlashLocation = Rat('\',PcFileString)
* Extract the Right-Most characters from the string up to
* the last back slash '\'
LcRetVal = Right(PcFileString, LnStringLength - LnSlashlocation)
Return LcRetVal
- Chris Holtz
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only