webCOMAND

#FILESIZE

Return the size of the file at the specified path, in number of bytes.

Prototype

#FILESIZE($path)

Parameters

  • Path - File path to file being evaluated, which can be on of three forms:
    • Absolute - Path from the file repository root ("files" folder).  For example: /publications/www.website.com/htdocs/index.html
    • Distribution - Path from Publication Publish Path.  For example: ./images/test.gif
    • Relative - Path from current Publication Procedure Filename path.  For example: attachments/test.pdf

Return

Size of file in bytes.

Example

#/ get and display the size of a file
#NEW($FileSize)#FILESIZE('/path/to/file')#ENDNEW
File Size: $FileSize bytes

Related

#FILE(GetSize)