Examples
Example 1
Program code Comment
N10 DEF BOOL RESULT ; Definition of result variables.
N20 RESULT=ISFILE("TESTFILE")
N30 IF(RESULT==FALSE)
N40 MSG("FILE DOES NOT EXIST")
N50 M0
N60 ENDIF
...
Example 2
Program code Comment
N10 DEF BOOL RESULT ; Definition of result variables.
N20 RESULT=ISFILE("TESTFILE")
N30 IF(NOT ISFILE("TESTFILE"))
N40 MSG("FILE DOES NOT EXIST")
N50 M0
N60 ENDIF
...
3.5.5 Read out file information (FILEDATE, FILETIME, FILESIZE, FILESTAT,
FILEINFO)
The FILEDATE, FILETIME, FILESIZE, FILESTAT, and FILEINFO commands read out
specific file information such as date/time of the last write access, current file size, file status or
all of this information.
Requirement
The currently set protection level must be equal to or greater than the show right of the
superordinate directory. If this is not the case, access is denied with an error message (return
value of error variable = 13).
Syntax
FILE....(<Error>,"<File name>",<Result>)
Meaning
FILEDATE: Returns the date of the last write access to a file
FILETIME: Returns the time of the last write access to a file
FILESIZE: Returns the current size of a file
Work preparation
3.5 File handling
NC programming
572 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0