Gamestudio Links
Zorro Links
Newest Posts
FXCM => AVA Trade Plugin???
by Martin_HH. 11/23/26 20:38
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 15,479 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Directory functions - get file list #466918
07/07/17 15:04
07/07/17 15:04
Joined: Jun 2017
Posts: 78
B
BobbyT Offline OP
Junior Member
BobbyT  Offline OP
Junior Member
B

Joined: Jun 2017
Posts: 78
Hello all,

Does Zorro have any directory related functions. I have only been able to find file related functions (defined in stdio.h).

Specifically, I would like to get a list of files in a directory (excluding it's sub-directories) and loop over them and do some stuff.

Is this possible (with native Zorro) or will I have to create a list of synthetic file names and look for them in the directory one by one (using the stdio file file_length() function).

Cheers,
BobbyT

PS: I think dirent.h is what I'm after but it has a lot of dependencies, even in native C. It would be no small feat to port stdio.h over to Zorro (if it's even possible) for someone like myself who is just starting out with 'true' C based languages. A ready implementation would make for an easy life laugh

Re: Directory functions - get file list [Re: BobbyT] #466952
07/10/17 15:29
07/10/17 15:29
Joined: Jul 2000
Posts: 28,149
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,149
Frankfurt
Look into the Windows API. If I remember right the directory functions have names like FindFirstFile, FindNextFile and so on.

Re: Directory functions - get file list [Re: jcl] #466961
07/10/17 17:39
07/10/17 17:39
Joined: Jun 2017
Posts: 78
B
BobbyT Offline OP
Junior Member
BobbyT  Offline OP
Junior Member
B

Joined: Jun 2017
Posts: 78
Thanks JCL. I'll dig into this when I get home today.

I have cooked up an alternative based on synthetic file names but API functions may be a more efficient way to go.

Cheers,
BobbyT


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1