[Yandex Cloud documentation](../../index.md) > [Yandex Virtual Private Cloud](../index.md) > [Step-by-step guides](index.md) > Cloud network > Moving a cloud network between folders

# Moving a cloud network to a different folder

You can move cloud resources between folders within a single [cloud](../../resource-manager/concepts/resources-hierarchy.md).

{% list tabs group=instructions %}

- Management console {#console}

  To move a [cloud network](../concepts/network.md) to a different folder:

  1. In the [management console](https://console.yandex.cloud), select the folder containing your cloud network.
  1. Navigate to **Virtual Private Cloud**.
  1. Click ![image](../../_assets/console-icons/ellipsis.svg) in the row of the network you need and select **Move**.
  1. In the window that opens, select the destination folder.
  1. Click **Move**.

  {% note info %}

  All the cloud network's subnets will be moved to the other folder as well.

  {% endnote %}

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  To move a [cloud network](../concepts/network.md) to a different folder:

  1. View the description of the CLI move cloud network command:

      ```bash
      yc vpc network move --help
      ```

  1. Get the name or ID of the cloud network to move:

      ```bash
      yc vpc network list
      ```
      Result:
      ```text
      +----------------------+-----------+
      |          ID          |   NAME    |
      +----------------------+-----------+
      | encb4ubvmief******** | default   |
      | enc39op1vq9m******** | network-1 |
      | enc772aa2rgq******** | network-2 |
      +----------------------+-----------+
      ```

  1. Get a list of available folders:

      ```bash
      yc resource-manager folder list
      ```

      Result:
      ```text
      +----------------------+------------------------+--------+--------+
      |          ID          |          NAME          | LABELS | STATUS |
      +----------------------+------------------------+--------+--------+
      | b1cs8ie21pk1******** | default                |        | ACTIVE |
      | b1chgf288nvg******** | my-folder-1            |        | ACTIVE |
      | b1cu6g9ielh6******** | my-folder-2            |        | ACTIVE |
      +----------------------+------------------------+--------+--------+
      ```

  1. Move the network by specifying the name or ID of the network and destination folder:

     ```bash
     yc vpc network move <network_name_or_ID> \
       --destination-folder-name <destination_folder_name> \
       --destination-folder-id <destination_folder_ID>
     ```
     Use either `--destination-folder-name` or `--destination-folder-id`.

     If the network is not in the current folder (default folder), specify the source folder using `--folder-name` or `--folder-id`.

     Result:

     ```text
     id: enc39op1vq9m********
      folder_id: b1chgf288nvg********
      created_at: "2022-10-06T14:54:48Z"
      name: network-1
      default_security_group_id: enc2ta63h3q2********
     ```

     For more information about the `yc vpc network move` command, see the [CLI reference](../../cli/cli-ref/vpc/cli-ref/network/move.md).

- API {#api}

  To move a [cloud network](../concepts/network.md) to a different folder, use the [move](../api-ref/Network/move.md) REST API method for the [Network](../api-ref/Network/index.md) resource or the [NetworkService/Move](../api-ref/grpc/Network/move.md) gRPC API call, and provide the following in the request:

  * ID of the cloud network you want to move, in the `networkId` parameter.

    To get the cloud network ID, use the [list](../api-ref/Network/list.md) REST API method for the [Network](../api-ref/Network/index.md) resource or the [NetworkService/List](../api-ref/grpc/Network/list.md) gRPC API call and provide the folder ID in the `folderId` request parameter.

  * ID of the folder you want to move the cloud network to, in the `destinationFolderId` parameter.

    To learn how to find out the folder ID, see [Getting the folder ID](../../resource-manager/operations/folder/get-id.md).

{% endlist %}

## Examples {#examples}

### Cloud network in the current folder {#from-default-folder}

Move a cloud network from the current folder by specifying the network name and destination folder name:

{% list tabs group=instructions %}

- CLI {#cli}

  ```bash
  yc vpc network move network-1 \
    --destination-folder-name my-folder-1
  ```

{% endlist %}

### Cloud network in a different folder {#from-another-folder}

Move a cloud network from a different folder. Specify the network ID and the source and destination folder IDs:

{% list tabs group=instructions %}

- CLI {#cli}

  ```bash
  yc vpc network move enc39op1vq9m******** \
    --folder-id b1chgf288nvg******** \
    --destination-folder-id b1cs8ie21pk1********
  ```

{% endlist %}