Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:54 17 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMaximite drive size

Author Message
Yourock17
Newbie

Joined: 09/01/2015
Location: Australia
Posts: 12
Posted: 12:26am 15 Feb 2016
Copy link to clipboard 
Print this post

Hello TBS, i have a question. I'm currently writing a program that is supposed to give me the used storage on B: Drive (SD Card). I'm struggling to find a solution to how i actually get the file sizes. I have seen DIR$() but it only does the current working directory. In summary, can someone suggest some code or a command that could perhaps help me to make a program that gets the file sizes of files on the drive, including sub directories.

Thank you.
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1579
Posted: 03:34am 15 Feb 2016
Copy link to clipboard 
Print this post

@Yourock17

I think there is still no better answer than this.

It's a working - but slow - solution (see File Selector->ReadDir)!

EDIT
Note: one call of FileSize() takes about 65ms! Maybe too slow for your application!?

Good luck!

Michael

Edited by twofingers 2016-02-16
causality ≠ correlation ≠ coincidence
 
Yourock17
Newbie

Joined: 09/01/2015
Location: Australia
Posts: 12
Posted: 10:45am 15 Feb 2016
Copy link to clipboard 
Print this post

Ok Thanks
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025