1. Larry Peters
  2. PowerBuilder
  3. Wednesday, 5 February 2020 18:33 PM UTC

Hi,

Can anyone point me at code which would recursively read files in directories as well as sub-directories. Recursion is necessary but I need a kick-start...

TIA

Larry

Accepted Answer
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 5 February 2020 19:41 PM UTC
  2. PowerBuilder
  3. # Permalink

https://www.topwizprogramming.com/freecode_filesys.html

It doesn't have recursion but it does have all the API functions you would need to get a list of files & folders.

It would be easy to make a version where of_getfiles called itself whenever it found a folder.

 

Comment
  1. Michael Kramer
  2. Wednesday, 5 February 2020 19:48 PM UTC
I have used this free code sample several times at different companies as a great starting point for generic solution. Looking back it turned out "generic" was slightly different at each company.
  1. Helpful 1
There are no comments made yet.
Larry Peters Accepted Answer Pending Moderation
  1. Wednesday, 5 February 2020 20:58 PM UTC
  2. PowerBuilder
  3. # 1

Thanks Roland

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.