SP File Functions

 STRIP_PATH()   Strip path and optionally extension from a filespec
 ISVALFILE()    Checks a file name for validity
 FMOVE2PRIOR()  Moves to beginning of previous CRLF delimited line in
                a text file
 FMOVE2NEXT()   Move to beginning of next line in a text file
 FILEINFO()     Returns file date,time,size
 NKEY()         Gets key of an index file
 SFREADLINE()   Reads in text up to the next CRLF in a text file
 WRITEFILE()    Writes a line or lines  to a text file

 

SP_STRIP_PATH

STRIP_PATH()

  Short:
  ------
  STRIP_PATH() Strip path and optionally extension from a
  filespec

  Returns:
  --------
  <cFile> => file name with path and optionally
  extension stripped

  Syntax:
  -------
  STRIP_PATH(cInSpec, [lStripExt])

  Description:
  ------------
  Returns <cInSpec>, the name of a file with its path
  stripped.

  [lStripExt] if True will strip the extension as well.
  Default is false.

  Examples:
  ---------
   ?STRIP_PATH("C:\HAIRY\CRITTERS\MONKEY.DBF")
   //  => returns "MONKEY.DBF"

   ?STRIP_PATH("C:\HAIRY\CRITTERS\MONKEY.DBF",.T.)
   //  => returns "MONKEY"

  Source:
  -------
  S_STRPAT.PRG