---
schema_version: "1"
id: 03454fa28cf2031784b0c17f016539790b0d7a7c90a463829e0b3ddb7acc7cff
title: "Migration Plans: Migration Scripts"
collection: tableau
version: current
locale: en-us
portal_url: https://docs.salesforce.com/tableau/current/en-us/online/cmt-plan_scripts.md
canonical_url: https://help.tableau.com/current/online/en-us/cmt-plan_scripts.htm
source_site: help.tableau.com
content_type: documentation
content_hash: ae000b324394c5643f4cd57d2d7e8fc599460282961588081892c7a5efe31604
description: Add pre- and post-migration scripts to a Content Migration Tool plan.
---
[Skip to main content](#main-content)

# Migration Plans: Migration Scripts

The next step of creating a migration plan in the Tableau Content Migration Tool is to create any scripts you want to run with your plan before or after migration.

## Step 1: Pre-Migration

The Run Pre Migration section of the screen is dedicated to scripts that will run before the migration.

![Settings to enable running pre-migration.](/tableau/current/en-us/online/en-us/Img/cmt-plan-script-pre.png)

Each field has a help icon you can get information from by moving your cursor over it. To start with your pre-migration scripts, select Enable, which will then activate the fields below.

#### Working Directory

This is the working directory for the script. The default directory is the same folder as the migration plan. Click on the browse button to select a different folder. The Reset button will restore the current migration plan folder as the working directory.

#### Run

This drop down allows you to choose either to run a custom script or an executable with parameters.

#### Command Executable

If you selected Executable with Parameters from the Run menu, this field will appear. This is the file path to the command executable to run before migration. Type it in directly or use the browse button to find the executable. This is a required field.

#### Command Parameters

If you selected Executable with Parameters from the Run drop-down menu, this field will appear. Enter in command line parameters here to use with the command executable.

#### Script

If you selected Custom script from the Run menu, enter in your pre-migration script here. It will be executed as a \*.cmd file. This is a required field.

## Step 2: Post-Migration

The Run Post Migration half of the screen is dedicated to scripts that will run after migration.

![Interface for configuring post-migration scripts with fields for executable and parameters.](/tableau/current/en-us/online/en-us/Img/cmt-plan-script-post.png)

Each field has a help icon you can get information from by moving your cursor over it. To start with your post-migration scripts, select Enable, which will then activate the fields below.

#### Working Directory

This is the working directory for the script. The default directory is the same folder as the migration plan. Click on the browse button to select a different folder. The Reset button will restore the current migration plan folder as the working directory.

#### Run

This drop down allows you to choose either to run a custom script or an executable with parameters.

#### Command Executable

If you selected Executable with Parameters from the Run menu, this field will appear. This is the file path to the command executable to run before migration. Type it in directly or use the browse button to find the executable. This is a required field.

#### Command Parameters

If you selected Executable with Parameters from the Run menu, this field displays. Enter in command line parameters here to use with the command executable.

#### Script

If you selected Custom script from the Run menu, enter in your post-migration script here. It will be executed as a \*.cmd file. This is a required field.

## Step 3: Continue to Next Step

When you are ready, click Next.

![A Next icon.](/tableau/current/en-us/online/en-us/Img/cmt-icon-next.png)

## Who can do this

Tableau site user with an Explorer role or higher. To migrate content, you must have **View** and **Download/Save a Copy** capabilities for workbooks on the source site and **View** and **Publish** capabilities for target projects on the destination site. For more information, see [Permissions](https://help.tableau.com/current/online/en-us/permissions.htm).