NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: osquiabro on January 04, 2023, 01:15:12 PM

Title: String Teory Question
Post by: osquiabro on January 04, 2023, 01:15:12 PM
Exist any function for return a file size in mb? or other any function for this?

thanks
Title: Re: String Teory Question
Post by: DonRidley on January 04, 2023, 03:42:49 PM
When you do st.Load() in StringTheory you can then use st.Length().

st.Load() calls this Win32 API (along with others):

stGetFileSize(long hFile,*long SizeHigh), long, pascal, name('GetFileSize')

https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfilesize

Just tested loading various files into the StringTheory demo.  Seems st.Length() after st.Load() will do what you need.


Title: Re: String Teory Question
Post by: Jane on January 04, 2023, 03:47:14 PM
Or https://www.capesoft.com/docs/winevent5/WinEvent.htm#ds_GetFileDirEntry
Title: Re: String Teory Question
Post by: osquiabro on January 05, 2023, 03:53:45 AM
Don and Jane Thanks..