scripting@wanadoo.nl




Touch()

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
2 July 2002 Touch()
AuthorAlex Heylin
Action Touches the save time on the file to current time. If the files doesn't exist, it is created as empty.
SyntaxTouch (file) 
Parameters
  • file (Required / String) File to touch 
  • RemarksAssumes FileNumber 9 isn't in use. 
    Returns-3 File number already in use
    -2 Invalid file number specified
    -1 Invalid file name specified
    0 File opened successfully
    >0 System error 
    DependenciesNone. 
    Examples
    IF (Touch("C:\test-touch-file.txt") = 0)
      ? "File was touched OK"
    ELSE
      ? "Error touching file - error: @error (@serror)"
    ENDIF
    
     
    Source
    FUNCTION Touch ($touchfile)
      ; Author:  Alex Heylin - kix@alexheylin.com
      ; Purpose: Touches the save time on the file to current time
      ;
      ; if the files doesn't exist, it is created as empty.
    
      $rc=Open(9, "$TouchFile", 5)
      IF $rc = 0
        $rc=Close(9)
      ENDIF
      $touch=@error
    ENDFUNCTION ; - Touch -
     
      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