Command Prompt for Windows




filesize, _wfilesize, _tfilesize

__int64 filesize(path);
__int64 _wfilesize(wchar_t *path);
__int64 _tfilesize(TCHAR *path);

Retrieve the size of a file.

Parameter Description
path Address of a NULL terminated character string containing the path of a filename. This path can be relative or absolute and can not contain wildcard characters.

Returns

The size (in bytes) of the specified file. When the file does not exist -1 is returned.

Comments

On error filesize() does NOT display an error message.

See Also

filecpy, filencpy, filecat, filencat