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.

Newcomers DBPro Corner / Directory Count

Author
Message
Jamie Rumbelow
16
Years of Service
User Offline
Joined: 6th Aug 2008
Location: Cambridge, England
Posted: 6th Aug 2008 20:36
Hey guys/gals,

Firstly, let me say I am LOVING DBPro, great job.

Secondly, I have read through the help files, but I can't seem to figure out how to work out how many files there are in a directory.

Could anyone hand me some pointers?

Thanks,

Jamie

"Great hopes outdwarf skill, for with hope, there is courage and belief, and with courage and belief anything is possible..." - James Elliot
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Aug 2008 01:26
If you want a count, you have to step through all files/directories in the current directory:


Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 7th Aug 2008 02:07
@IanM: Wow that's a cool way of doing it. Sure beats the checklist commands .

Jamie Rumbelow
16
Years of Service
User Offline
Joined: 6th Aug 2008
Location: Cambridge, England
Posted: 7th Aug 2008 13:24
Nice IanM, and yeah, better than checklisting. Also, FYI, checklists add "." and ".." to the beginning, so you have to use CHECKLIST QUANTITY()-2

"Great hopes outdwarf skill, for with hope, there is courage and belief, and with courage and belief anything is possible..." - James Elliot
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Aug 2008 15:29
You get the same two folders using the find commands, but you can see where I excluded them in the code.

Login to post a reply

Server time is: 2024-11-25 19:32:05
Your offset time is: 2024-11-25 19:32:05