I have a problem with reading external files and an unlikely solution requiring advice.
I’ve tried reading and writing to files using SAF in examples one to three given at the start of the SAF thread and had no problem with examples 2 or 3, which deal with files created by the App. But with example one I can’t get the 'Build Document URI using Tree’ function to work on files created by a text editor as it doesn’t add the file identifier characters. I have demonstrated the problem and one unlikely solution using two versions of example 1 implemented as a series of steps controlled by buttons.
In the first method TSAF1 I list a directory, locate the required file and copy its URI string to label 3 to replace the ‘Build Document URI using Tree’ in the read file function. This works perfectly and could be readily implemented with a search function to find the required file, but is surely not the method intended.
The second method is a copy of example 1, Label 4 is the output of the ‘Build Document URI using Tree’ function. If you compare label 3 with label 4 you will see that the file identifier characters are missing from label 4 and the read operation produces no result.
Can anyone tell me what inputs I need to obtain the complete URI from the ‘Build Document URI using Tree’ block? The URI should be identical with label 3. Alternatively, if reading files created externally is impossible with SAF as appears to be the case from this test, then is it reasonable to use the search directory method in the TSAF1 example?
Version 1 see also AIA below image
TSAF1.aia (31.4 KB)
Version 2 see also AIA below image
TSAF2.aia (31.4 KB)