home *** CD-ROM | disk | FTP | other *** search
/ Media Share 13 / mediashare_13.zip / mediashare_13 / ZIPPED / NETWORK / GP25.ZIP / PATH.PRG < prev    next >
Text File  |  1993-02-11  |  497b  |  21 lines

  1. *  The purpose of this function is to return the path associated with
  2. *  a path\file name combination
  3. *  NOTE This function assumes that there is either a file name at the end
  4. *  of the path, or that the path has a trailing '\'
  5. *
  6. parameter cName
  7. if type('cName') <> 'C'
  8.     return .f.
  9. endif
  10. cName = upper(alltrim(cName))
  11. if '\' $ cName
  12.     cName = left(cName, rat('\', cName))
  13. else
  14.     if substr(cName, 2, 1) == ':'
  15.         cName = left(cName, 2)
  16.     else
  17.         cName = ''
  18.     endif
  19. endif
  20. return cName
  21.