Dataport file size

Is it possible to read the byte total of a TXT file and import the byte total during the dataport of the TXT file? Thanks

Declare variable “ImportFile”, type=File. In OnPreDataPort-trigger write: ImportFile.OPEN(CurrDataport.NAME); Message('Length of file (bytes): %1',ImportFile.LEN);