Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / FileSize help

Author
Message
haliop
User Banned
Posted: 17th Jul 2013 06:57
can someone help with me a function for checkng the file size
in bytes/ Kilobytes/ Megabytes

i have a function for it but it dosent work and its on the other computer which is not connected..

can some help?

haliop
User Banned
Posted: 17th Jul 2013 06:58
oops... mods can you please move this to AppGameKit main section?

Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 17th Jul 2013 07:24
You can just use the GetFileSize() command and then divide by powers of 1024 to get kilobytes, megabytes etc.

xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 17th Jul 2013 07:36
GetFileSize(iFileID) doesn't work for you? (You have to load the file before checking it).
haliop
User Banned
Posted: 18th Jul 2013 14:41
ok got it!
so
GetFileSize(1) = bytes
GetFileSize(1)/1024 = kb
getFileSize(1)/(1024*1024) = MB
right?

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 18th Jul 2013 16:48
Looks good. Don't forget gigabytes - getFileSize(1)/(1024*1024*1024)

Although you should not expect that on portable devices.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
haliop
User Banned
Posted: 18th Jul 2013 20:41

Login to post a reply

Server time is: 2024-11-24 18:58:29
Your offset time is: 2024-11-24 18:58:29