Jump to content




Count elements in a folder


  • You cannot reply to this topic
2 replies to this topic

#1 MarioBG

  • Members
  • 43 posts
  • LocationSpain (or Hisperia)

Posted 27 June 2012 - 10:54 PM

Hello, I'm kinda beginner to programming, but I have already started a little bank management system for a server. The point is, I would highly appreciate some code that counted the number of accounts (every account is a separate file in a folder called "secure") registered in the system. I would post the code I have written by now but I'm afraid it's in Spanish, because I am also Spanish. Could you please solve this little problem of mine? Thanks in advance! Oh, and if you needed it, I wouldn't mind posting what I have done by now of the program itself anyway :P/> . Thanks!

#2 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 27 June 2012 - 11:00 PM

You can use this:
local count = #fs.list("PathHere")
Not tested, but it should work.

#3 MarioBG

  • Members
  • 43 posts
  • LocationSpain (or Hisperia)

Posted 02 July 2012 - 11:11 PM

Thanks Mystic, it works perfectly! Now i'm able to make my project of bursatile system! Thanks a lot!





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users