Function: FileSize
- Updated2023-02-21
- 1 minute(s) read
Function: FileSize
Determines the size of a file in bytes.
ReturnValue = FileSize(FileName )
Input Parameters
| FileName | Specifies a file with path and extension. In the filename and extension, you can use ? as a wildcard for a single character and * for several characters. If you do not specify a path, DIAdem searches for the file in the DIAdem folder. |
Return Parameters
| ReturnValue | Returns an integer value. If DIAdem cannot uniquely determine or find the file, the function returns the value 0. |
Examples
The following example determines the size of files.
| VBScript | Python |
Dim intMyResult intMyResult = FileSize(DataLibrPath & "Example.tdm") intMyResult = FileSize(LayoutLibrPath & "Example.tdr")
Related Functions
Command: ChnValExpand | Command: DataFileCopy | Command: DataFileDelete | Command: DataFileLoad | Command: DataFileLoadRed | Command: DataFileLoadSel | Command: DataFileLstGet | Command: DataFileMove | Command: DataFileRename | Command: DataFileSave | Command: DataFileSaveSel | Command: DataFileSelDlg | Command: DataFileSelDlg | Command: FileDlgShow | Command: FileNameGet | Command: FileNameGet | Command: PathDlgShow | Commands and Variables for Working with Data | Commands and Variables for Working with Files and Folders | DIAdem Library Paths | DIAdem Path Variables | DIAdem User Paths | Function: DataFileSize | Function: FileAttrCheck | Function: FileDateGet | Function: FilEx | Function: FolderAttrCheck | Function: FolderDateGet | Function: FolderExist | Function: FolderSize | Variable: FileExportFilter | Variable: FileFilter | Variable: FileImportFilter