Robot Web Services
3HAC050973-001 Revision:L, Application Manual - Robot Web Services
Create a copy of a file

Create a copy of a file

URL

/fileservice/{device|environment_variable}/{filename}

Method

POST

URL Params

See Common URL parameters

Data Params

  • fs-overwrite= true|false defaults to false.
  • fs-newname= The new file name. See Notes below. Required
  • fs-action=copy Required

Success Response

NO_CONTENT(204)

Example Response

No content

Error Response

UNAUTHORIZED(401), NOT_FOUND(404), BAD_REQUEST(400), UNSUPPORTED_MEDIA(415), CONFLICT(409)

See Robot controller return codes

Sample Call

Create a copy of a file

curl --digest -u "Default User":robotics -d "fs-newname=newfile.txt&fs-action=copy" -X POST "http://localhost/fileservice/$home/file.txt"

Notes

The value for fs-newname can either be absolute or relative. It is differentiated based on the whether the value has a leading slash (absolute) or not (relative).

Note: when absolute paths are used, it should start from /fileservice e.g.

Absolute path : fs-newname=/fileservice/$home/copyfile2.txt

Relative to source path: fs-newname=copyfile2.txt

Supported in bootserver mode

Maximum supported file size is less than 2GB.