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.

DarkBASIC Professional Discussion / File count in folder?

Author
Message
jeffhuys
20
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 10th Sep 2010 13:29
Hey,

Is there a command present that returns the amount of files in a folder?
Like:


Thanks!

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th Sep 2010 14:06
Try this (adapted from the help file example ):

jeffhuys
20
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 10th Sep 2010 14:12
Ah! How could I forget that command... Haha!
Thanks!

Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 10th Sep 2010 14:12
I don't know about a command like that, but you could count them with the FIND FIRST (jumps to the very first in the folder), FIND NEXT (jumps one, and you should repeat it until it says no files left) commands i guess... after you set the working directory with SET DIR.

Haven't tried it but if i needed to count files i would start with this.
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 14th Sep 2010 20:11
@ Quel: GG already got it spot on! lol

My signature is NOT a moderator plaything! Stop changing it!

Login to post a reply

Server time is: 2026-07-22 17:33:50
Your offset time is: 2026-07-22 17:33:50