scripting@wanadoo.nl




GetFilePath()

http://www.scriptlogic.com/kixtart/FunctionLibrary_FunctionList.aspx


actual FunctionLibrary list on 'Scriptlogic' site printer-friendly mirror of UDF topic on 'scripting@wanadoo.nl' site close
9 January 2002 GetFilePath()
AuthorScriptLogic Corporation
Action Returns the path-only portion of a given filespec.
SyntaxGetFilePath ("filespec") 
Parameters
  • filespec (Required / String) The filespec (path + filename) you wish to extract the path from. 
  • RemarksThe filespec must contain at least one backslash "\".
    Complimentary to the GetFileExt() and GetFileName() UDFs. 
    ReturnsReturns the path-only portion from the filespec.
    Requires KiXtart 2001 (4.0) final due to InstrRev() function. 
    DependenciesNone. 
    Examples
    ? GetFilePath('%temp%\myfile.txt')
    ? GetFilePath('\\server\share\myfile')
    
     
    Source
    FUNCTION GetFilePath ($filespec)
      ; extracts the path-only portion of a complete filespec.
      DIM $bash
      $getfilepath=''
      $bash=InStrRev($filespec,'\')
      IF $bash
        $getfilepath=Substr($filespec,1,$bash-1)
      ENDIF
    ENDFUNCTION ; - GetFilePath -
     
      original source of UDF topic. show actual FunctionLibrary list on Scriptlogic site close top
              printer-friendly mirror of UDF topic on scripting@wanadoo.nl site  




    Copyright © 2003 www.scriptlogic.com & scripting@wanadoo.nl - last updated on 20 May 2003


    Site Meter