Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A question about the mask
#8
(03-18-2023, 08:56 AM)Petr Wrote: But there is one more question. *.* should list folders and subdirectories if I remember correctly. Command$ won't do that. Is there a trick to get those subdirectories out of it? If it doesn't work out like this, I'll take a different approach, I'm just asking. I am working on upgrading my PMF2 program.

It will have to be done the "direntry.h" way. (The original C header file on Linux is called "dirent.h".) I'm not familiar with it but there should be a field in the structure which helps the programmer tell if the file is a "regular" file or if it's a directory. If it's a directory then you'll have to get another list of files for that directory. It's best to keep track of directories into a string array, as they are found and, after one directory is processed for the file names it has, take it out of the array.

Might want to look at this:

https://qb64phoenix.com/forum/showthread.php?tid=68

Understandably, "*.*" is limited only to the current directory because if could involve thousands of files in subdirectories, and this could choke certain command-line programs and other programs which are not well-written.
Reply


Messages In This Thread
A question about the mask - by Petr - 03-17-2023, 05:13 PM
RE: A question about the mask - by Petr - 03-17-2023, 05:34 PM
RE: A question about the mask - by mnrvovrfc - 03-17-2023, 08:52 PM
RE: A question about the mask - by mnrvovrfc - 03-17-2023, 09:19 PM
RE: A question about the mask - by Petr - 03-18-2023, 08:56 AM
RE: A question about the mask - by mnrvovrfc - 03-18-2023, 10:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  a question about OpenGL in QB64pe: TempodiBasic 11 1,863 11-22-2025, 05:47 PM
Last Post: TempodiBasic
  Question about load pictures Jim_001 4 556 10-22-2025, 06:19 AM
Last Post: Unseen Machine
  Test to post a new Thread + question 32 or 64 bit Rudy M 2 556 09-09-2025, 04:10 PM
Last Post: Rudy M
  Quick Question (I hope) bplus 3 739 02-26-2025, 01:14 AM
Last Post: SMcNeill
  Mix mode input of a binary open file Question! doppler 5 1,512 11-28-2024, 03:06 PM
Last Post: Petr

Forum Jump:


Users browsing this thread: 1 Guest(s)