> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Bulk Commands

export const Link = ({href, children, className, ...props}) => {
  const localizedHref = href;
  return <a href={localizedHref} className={className} {...props}>
      {children}
    </a>;
};

## Bulk Commands

You can use a CSV file to execute commands in bulk. Each row of the
spreadsheet is treated as an individual API call.

To execute a bulk command, use the option `--bulk-file-path=<PATH_TO_CSV>`, where
`<PATH_TO_CSV>` is the local path of a CSV file containing the
necessary information.

For example, you can create folders using the command `box folders:create --bulk-file-path=path/to/file.csv`

<Tip>
  Drag the CSV file from your finder window/file explorer to the
  terminal/command line window to auto-populate the path.
</Tip>

To specify the column names for your CSV file, go to the [GitHub repository][github] and look at the argument names, or use the `--help` option. In this
case, these are `PARENTID` and `NAME` and are case insensitive.
You can also use a CSV
[template][csv] for this example bulk create folders command.

Executing the command below creates three folders at the root level, 0, of the
Service Account's folder tree.

```bash theme={null}
box folders:create --bulk-file-path=/Users/ExampleUser/Desktop/bulkcreatefolders.csv
```

## Set up and use bulk commands

1. Clone the `boxcli` GitHub repository or download the files from [`Bulk actions`][bulkactions] directory.

   ```bash theme={null}
   git clone https://github.com/box/boxcli.git
   ```

2. Adjust the `.csv` template to your needs. For example, if you want to create several folders, you can use the [`folders-create.csv`][folderstemplate] template as your starting point.

3. Run the command.

   ```bash theme={null}
   box folders:create --bulk-file-path <PATH_TO_CSV>/folders-create.csv
   ```

[console]: https://app.box.com/developers/console

[bulkactions]: https://github.com/box/boxcli/tree/main/docs/Bulk%20actions

[folderstemplate]: https://github.com/box/boxcli/blob/main/docs/Bulk%20actions/folders/folders-create.csv

## Bulk Commands with Options

Any option included in the command is applied to every row in the CSV file. For example,
`box folders:collaborations:create --bulk-file-path=path/to/file.csv --role=editor`
will create collaborations for each user in the csv as an editor.

However, you can also use options in the CSV file. Building on the last example,
instead of using the `--role=editor` option in the command itself, it can be a
column called `role`. The command becomes:
`box folders:collaborations:create --bulk-file-path=pathtocsv`

## CSV templates

Predefined CSV templates help you to structure the data you want to manage in bulk. Templates reside in the [`Bulk actions`][bulkactions] directory, grouped into folders. The table below lists the currently available templates.

| Templates              | Description                                                         |
| ---------------------- | ------------------------------------------------------------------- |
| box collaborations     | Create, delete, and update collaborations.                          |
| box files              | Download, update, and upload files.                                 |
| box folders            | Create and update folders, add metadata to folders.                 |
| box groups             | Create groups and add memberships.                                  |
| box metadata-templates | Create metadata templates and metadata cascade policies on folders. |
| box shared-links       | Delete shared links.                                                |
| box users              | Create and update users, move one user's content to another user.   |
| box webhooks           | Delete webhooks.                                                    |

[github]: https://github.com/box/boxcli#command-topics

[csv]: https://github.com/box/boxcli/blob/main/docs/Bulk%20actions/folders/folders-create.csv
