# copy-list command

The copy-list command copies a saved
list to either a new item-ID, a new file reference, or to the specified
output device.

**Synonyms:** cl

A file reference may be specified because any file can
hold lists. Conversely, the copy command may also
be used, but it does not default to the pointer-file.

## Syntax

```
copy-list {{file.reference} {itemlist*} {(options}
to: {(file.reference} {itemlist}
```

## Parameter(s)

| file.reference | Specifies the items are copied from the pointer-file. | |
| --- | --- | --- |
| itemlist* | Specifies the default item-ID, %user-ID, is used. | |
| options | d | Deletes the source items from the source file after copying. |
| n | Activates the nopage function on output to the terminal. | |
| o | Overwrites duplicate item-IDs. | |
| p | Copies list to printer via the spooler. | |
| s | Suppresses display of line numbers when used with the t or p option, and suppresses the error message output on a file copy. | |
| t | Copies list to terminal. | |
| u | Copies item if the item-ID is in the destination file and renames it by concatenating the current-ID with a character, starting with a lowercase a . | |
| x | Lists output in hexadecimal, when used with the t or p option. | |

## Example(s)

Copies a list called `temp.list` from the pointer-file file
in the dm account to the pointer-file file in
the `prod` account. After copying successfully, the
list is deleted from the dm,pointer-file, with
the d option. Path names are provided in the source
and in the destination files. This command is valid from any account.

```
copy-list dm,pointer-file, temp.list (d
to: (prod,pointer-file, cust.list
```

## See also

- [Active list](https://d3codex.com/definitions/active-list/)
- [compare-list command](https://d3codex.com/tcl/compare-list-command/)
- [copy command](https://d3codex.com/tcl/copy-command/)
- [delete-list command](https://d3codex.com/tcl/delete-list-command/)
- [edit-list command](https://d3codex.com/tcl/edit-list-command/)
- [fl command](https://d3codex.com/tcl/fl-command/)
- [get-list command](https://d3codex.com/tcl/get-list-command/)
- [list-lists macro](https://d3codex.com/tcl/list-lists-macro/)
- [pointer-file file](https://d3codex.com/systemfiles/pointer-file-file/)
- [save-list command](https://d3codex.com/tcl/save-list-command/)
- [Secondary list](https://d3codex.com/definitions/secondary-list/)
- [nselect command](https://d3codex.com/access/nselect-command/)
- [sort-list command](https://d3codex.com/tcl/sort-list-command/)

---
Source: https://d3codex.com/tcl/copy-list-command/ - part of the D3Codex reference.
