Running Content Porter from the command prompt
Use the Content Porter console client to perform exports or imports from the command line, unattended or in a batch file.
Apart from using the Content Porter wizard, you can also run Content Porter using a console client from the Windows command prompt. Use this client if you want to import or export content unattended, or as part of a non-interactive batch process.
The command line executable that is the console client, called cpcmd.exe, is located in a randomly named folder under the folder c:\Documents and Settings\<your username>\Local Settings\Apps\2.0\, where <your username> is the name of the user who installed the client. You can find out the exact location of the executable by accessing the Windows Start menu and navigating to (or . This opens the folder that contains cpcmd.exe.
This executable has a number of command line parameters. Parameters start with a slash (/). You set parameter values by using the format /param:value (so, for example: /user:DOMAIN\jlocke).The following table lists all the command line parameters.
The parameters are as follows:
| Parameter | Description |
|---|---|
config | Use to specify a configuration file, created in the client, that tells Content Porter what to do. This parameter is mandatory. |
user | Use to specify a user name (and domain) for the Content Manager you are importing into, or exporting from, for example DOMAIN\user. |
password | Specify a password for the Content Manager you are importing into, or exporting from. Note that you must escape the characters '|', '^', '&', '(' and ')' by typing a '^' in front of them. |
mappings | (optional) Uses an explicit mappings file that you created earlier. Refer to the implementation topics to learn more about explicit mappings. |
help | (optional) Shows Content Porter help information. |