= Performing Batch Operations with Files
Create files that contain a set of operations and then pass them to the {brandname} CLI.

.Procedure

. Create a file that contains a set of operations.
+
For example, create a file named `batch` that creates a cache named `mybatch`, adds two entries to the cache, and disconnects from the CLI.
+
[source,options="nowrap",subs=attributes+]
----
$ cat > batch<<EOF
create cache --template=org.infinispan.DIST_SYNC mybatch
put --cache=mybatch hello world
put --cache=mybatch hola mundo
disconnect
EOF
----
+
. Run the CLI and specify the file as input.
+
[source,options="nowrap",subs=attributes+]
----
$ bin/cli.sh -c localhost:11222 -f batch
----
+
. Create a new {brandname} CLI connection and verify `mybatch`.
+
[source,options="nowrap",subs=attributes+]
----
[//containers/default]> ls caches
___protobuf_metadata
mybatch
[//containers/default]> ls caches/mybatch
hola
hello
[//containers/default]> disconnect
[disconnected]>
----

[NOTE]
====
CLI batch files support system property expansion. Strings that use the
`${property}` format are replaced with the value of the `property` system
property.
====
