I have a simple procedure that first uses fllecatalog() to create a text array of file and folder paths, and then loops to add a record to hold the path stored in each array element. If there are 31 or fewer items in the text array, the loop works as expected. If there are more than 31 items, it works properly for those 31 items, at which point it seems to switch to an infinite loop of adding records and leaving them empty. Is anyone aware of a rational explanation for this? Here is the procedure:
local thefolder,lof,numfiles,ctr
choosefileDialog thefolder,"folders",true()
lof=filecatalog(thefolder,"includefolders","true")
clipboard()=lof //I used this to confirm that filecatalog correctly captures all files and folders in lof
numfiles=arraysize(lof,¶)
ctr=1
Loop
AddRecord
Path=array(lof,ctr,¶) //Path is the destination field; changing the field name has no effect
ctr=ctr+1
Until ctr>numfiles