Jonathan -
apologies for misreading your email! I'm not well-versed in the .bxs COMMAND syntax, but maybe this is closer?
I couldn't quite get a handle on using the EXECUTE syntax for this, but I'm under-caffeinated :)
Another piece of uncertainty: can you pass variables from the .bxs to a script you are RUNning? Maybe Christian can help us both understand some things!
Best,
Bridger
test-tsv.bxs
```
CREATE DB test-tsv
RUN /home/bridger/test-tsv.xq
LIST test-tsv
```
test-tsv.xq
```
for $T in file:children("/home/bridger/tsvs/")
let $TSV := csv:doc($T, map { "format": "direct", "separator": "tab", "header": true() })
let $TSV-NAME := file:name($T)
return db:add("test-tsv", $TSV, "/" || $TSV-NAME)
```
note: you could specify a db path here; e.g. db:add("test-tsv", $TSV, "/tsv-files/" || $TSV-NAME)
I've attached my two sample TSV files if that helps.