SiMX Help‎ > ‎The Target Platform‎ > ‎Objects‎ > ‎TARGET Object‎ > ‎target.file‎ > ‎

GetSize


Platform Objects


Description

Returns a file's size.

Syntax


Function GetSize( filename )

filename (input) - the file to be checked

Return value


This function returns a string that specifies the size of the input file.

Sample

'---------- Start ----------
Function Start
Dim file
file = "C:\FileTestFolder\trgFileSample.txt"
if target.file.GetSize(file) < 1024 then
trg.Message( "This file is less than 1kb, are you sure it is the right file?" )
end if

End Function

See also

Platform Objects and Methods
target.file.GetName
target.file.GetText
target.file