Problem with sorting files into different categories

Sorry for the vague title.

I'm trying to get a cookbook into my app and use information from text files to sort the recipes correctly.
The files all have a relevant prefix to their category.
The recipes are saved as dictionaries inside a list inside their category.
The app calls the "Readfrom" operation for every file and is supposed to sort the recipes into the dictionary of the same name as their prefix. However, every recipe appears to be stored in the category of the last file.
Here are my blocks :

And here an .aia:
FileSystem20220901_V2(1).aia (10.0 KB)

Can somebody help me? What am I missing here?

Your problem comes from shooting out Read File requests like bullets from a machine gun, in a loop.

Do the first Read File, then in the File Got Text event, store the incoming text and issue the next Read File.

Use either a global index number or a temporary depleting filename list to keep track of which is the current arriving file.

Here is a sample ...


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.