curl -v -S --user username:password
"http://192.168.24.106/?command=FileControl&file=CPU:program.CR1
&action=1"
Both operations can be combined in a batch file.
8.6.3.14.10 File Management — FileControl Command
FileControl allows a web client to perform file system operations on a host
CR1000. FileControl takes the form:
http://ip_address/?command=FileControl&file=drive:filename.dat&a
ction=x
FileControl requires a minimum .csipasswd access level of 1 (all access
allowed).
Table 120. FileControl API Command Parameters
action
1 — Compile and run the file specified by file and mark it as the program to be run on power up.
2 — Mark the file specified by file as the program to be run on power up.
3 — Mark the file specified by file as hidden.
4 — Delete the file specified by file.
5 — Format the device specified by file.
6 — Compile and run the file specified by file without deleting existing data tables.
7 — Stop the currently running program.
8 — Stop the currently running program and delete associated data tables.
9 — Perform a full memory reset.
10 — Compile and run the program specified by file but do not change the program currently
marked to run on power up.
11 — Pause execution of the currently running program.
12 — Resume execution of the currently paused program.
13 — Stop the currently running program, delete its associated data tables, run the program
specified by file, and mark the same file as the program to be run on power up.
14 — Stop the currently running program, delete its associated data tables, and run the program
specified by file without affecting the program to be run on power up.
15 — Move the file specified by file2 to the name specified by file.
16 — Move the file specified by file2 to the name specified by file, stop the currently running
program, delete its associated data tables, and run the program specified by file2 while marking it
to run on power up.
17 — Move the file specified by file2 to the name specified by file, stop the currently running
program, delete its associated data tables, and run the program specified by file2 without affecting
the program that will run on power up.
18 — Copy the file specified by file2 to the name specified by file.
19 — Copy the file specified by file2 to the name specified by file, stop the currently running
program, delete its associated data tables, and run the program specified by file2 while marking it
to run on power up.
20 — Copy the file specified by file2 to the name specified by file, stop the currently running
program, delete its associated data tables, and run the program specified by file2 without affecting
the program that will run on power up.
file
Specifies the first parameter for the file control operation. This parameter must be specified for
action values 1, 2, 3, 4, 5, 6, 10, 13, 14, 15, 16, 17, 18, 19, and 20.
file2
Specifies the second parameter for the file control operation. This parameter must be specified for
action values 15, 16, 17, 18, 19, and 20.
format
Specifies the format of the response. The values html, json, and xml are recognized. If this
parameter is omitted, or if the value is html, empty, or invalid, the response is HTML.
444