read files from directory

Deyhim used Ask the Experts™
I wondering if I can read or calculate number of files in directory using powerbuilder, Actually i cant use DirList function  because it need datalist control which i dont have it.

I want simply to create function to calculate number of files in directory ..  for example function name is files_num.

files_num('C:/test/*.txt') .. this function will return number of text files in 'C:/test' ..

there is any way to do this using powerbuilder 10.5?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

The solution mentioned in the below link gives u more details.
Names of files inside folder and/or subfolders.
You can use it or simply do an Upperbound on the array returned to get a count of number of files.


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial