Skip to content
Jonathan Chan edited this page May 11, 2018 · 6 revisions

redcap-delete-file deletes a file from a REDCap project record in a file field.

Parameter Description
host Server hostname
token Authentication token (project and user specific!)
record Primary id of record
field Field variable name which has the file to be deleted
xargs Optional parameters: see below

Optional parameters must come in pairs of 'symbol "string".

Optional Parameter Description
'form "[form]" Deletes from the record with the given form.
'event "[event]" Deletes from the record with the given event in longitudinal projects.

Examples

Example 1: Delete a file under the field file2 in study 1.

> (define redcap:token "54CC....CC10")
> (define redcap:hostname "redcap.INSTITUTIONNAME.ca")
> (redcap-delete-file redcap:hostname redcap:token "1" "file2")
Clone this wiki locally