In the DATABASEEXPORTCSV procedure lines 37-39 are adding extra text to the path. Your path of “~/Junk.txt” is converted to “/Users/username/Documents/~/Junk.txt”. if you change line 37 to read:
if exportPath notmatch "*/*"
instead of:
if exportPath notmatch "/*"
you will have it function properly in your case.
I’ll leave it to Jim to further address this as to the permanent fix. The same code is also found in the DATABASEEXPORTJSON and DATABASEEXPORTTSV procedures.
Thank you David, that is indeed the fix and I have gone ahead and corrected all three of these statements (thanks also to Gary for pointing out that the fix was needed in 3 places).
In the meantime, Robert can get his code working with this adjustment, no need to tweak the library code: