Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:03 12 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 : File Manager for PicoMite

     Page 18 of 18    
Author Message
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5058
Posted: 09:05am 11 Jul 2025
Copy link to clipboard 
Print this post

Hi javavi,

I think now you have 2 string arrays that hold the file names.
My idea is that you include the file size as "text" into the string, aligned to the right.

example "filename.ext       12340"

Then you do not have to reserve extra memory.

Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4302
Posted: 10:36am 11 Jul 2025
Copy link to clipboard 
Print this post

  javavi said   That's why I'm asking for help in making a procedure for searching for a file by template starting from the current folder including all nested ones?


Perhaps file.find() in https://github.com/thwill1000/mmbasic-sptools/blob/master/src/splib/file.inc but that does mean grokking my idiosyncratic BASIC code.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1576
Posted: 09:06pm 11 Jul 2025
Copy link to clipboard 
Print this post

  javavi said  ... a procedure for searching for a file by template starting from the current folder including all nested ones?

Hi Vadim,
nice to hear from you again. I'm glad you're keeping up!
Do you mean something like this:

findfile.zip

The disadvantage is the large memory requirement if you don't limit the maximum number of finds. Perhaps you could also output the data page by page, then the screen would be the memory, so to speak.

Regards
Michael
causality ≠ correlation ≠ coincidence
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 461
Posted: 04:22am 12 Jul 2025
Copy link to clipboard 
Print this post

Hi Volhout,
  Volhout said  I think now you have 2 string arrays that hold the file names.
My idea is that you include the file size as "text" into the string, aligned to the right.
example "filename.ext       12340"
Then you do not have to reserve extra memory.

And this is an interesting idea!
At first I thought that it is not suitable, since the lines from the file list array are needed not only for display on panels, but also as data in operations.
But then I realized that you can patch the lines with binary data from the end without breaking their string content!
And so, to a 63-character line I can add a 32-bit File Size WORD at the end, plus one more byte of File Attribute, and my File Name field will be reduced from 63 to 58 characters, which I think is not critical!
But all this information can be stored in one File List array.
 
     Page 18 of 18    
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