[Yandex Cloud documentation](../../index.md) > [Yandex Virtual Private Cloud](../index.md) > [Step-by-step guides](index.md) > Static routing > Moving a route table between folders

# Moving a route table 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 [route table](../concepts/routing.md) to another folder:

  1. In the [management console](https://console.yandex.cloud), select the folder containing your routing table.
  1. Navigate to **Virtual Private Cloud**.
  1. In the left-hand panel, select ![image](../../_assets/console-icons/route.svg) **Routing tables**.
  1. Click ![image](../../_assets/console-icons/ellipsis.svg) in the row of the table to move and select **Move**.
  1. Select the destination folder from the drop-down list.
  1. Click **Move**.

- 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 [route table](../concepts/routing.md) to another folder:

  1. View the description of the CLI command for moving route tables:

      ```bash
      yc vpc route-table move --help
      ```

  1. Get the name or ID of the route table to move:

      ```bash
      yc vpc route-table list
      ```
      Result:
      ```text
      +----------------------+---------+-------------+----------------------+
      |          ID          |  NAME   | DESCRIPTION |      NETWORK-ID      |
      +----------------------+---------+-------------+----------------------+
      | enp8c7ia88i8******** | table-1 |             | encb4ubvmief******** |
      +----------------------+---------+-------------+----------------------+
      ```

  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 route table by specifying the name or ID of the table and destination folder:

     ```bash
     yc vpc route-table move <route_table_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 route table is not in the current folder (default folder), specify the source folder using `--folder-name` or `--folder-id`.

     Result:
     ```text
     id: enp8c7ia88i8********
     folder_id: b1chgf288nvg********
     created_at: "2022-10-10T05:55:39Z"
     name: table-1
     network_id: encb4ubvmief********
     ```
     For more information about the `yc vpc route-table move` command, see the [CLI reference](../../cli/cli-ref/vpc/cli-ref/route-table/move.md).

- API {#api}

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

  * ID of the route table you need to move in the `routeTableId` parameter.

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

  * ID of the folder the route table will be moved 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}

### Route table in the current folder {#from-default-folder}

Move a route table from the current folder by specifying the table name and destination folder name:

{% list tabs group=instructions %}

- CLI {#cli}

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

{% endlist %}


#### See also {#see-also}

* [Moving a cloud network to a different folder](network-move.md)
* [Moving a subnet to a different folder](subnet-move.md)