Folder Copy

1. Introduction

This guide will quickly walk you through installing and configuring a custom script that copies a folder from CMS A to CMS B. It assumes that you have a recent version of PHP installed on your web server and that you are comfortable with Cascade. Knowledge of PHP is also useful, but not necessary to use this guide.

2. Components

There are several components to the template change system including the script itself and the configuration page. The script will read its configuration from a configuration file that you will publish (with the use of a data definition), and copy the chosen folder and all of its subfolders to the new CMS.

3. The Configuration Page

Create a page called "copy-folder-config.xml" and give it a .php publish extension.  Then give it the copy-folder-config-data-definition.xml data definition.  Supply a valid folder path, user-name, password, and server URL for your old CMS instance.  Next, supply a valid new base folder path, user-name, password, and server URL for your new CMS instance.  The new base folder path needs to already exist on the new instance of CMS.

4. Using

To use the script, publish the page and file assets.  Enter in proper server authentication information in the configuration page for both servers, and make sure that the old folder path is correct.  Then supply the desired new base folder path, and publish the page.  Before running the script, make sure the new base folder path already exists.  Running the script will then copy the desired folder from the old CMS instance to the new one, into the new base path.

Folder Copy Files

  1. copy-folder-PHP.zip
    This is a zip file with all the necessary scripts.
  2. wsdl-php.txt
    This is the PHP wrapper API around the WSDL for the web services.
  3. copy-folder-config-data-definition.xml
    This is the data definition to visually configure the XML config file.
  4. copy-folder-config-xml-php.txt
    This is an example XML config file.
  5. copy-folder-php.txt
    This is the main script that does the folder copying between CMS instances.