Define the post process batch file - HxGN SDx - Update 60 - Administration & Configuration

HxGN SDx Server Manager Help

Language
English
Product
HxGN SDx
Search by Category
Administration & Configuration
SmartPlant Foundation / SDx Version
10

The Post process batch file setting in the System Settings node defines the location of a batch file that the software runs when you update a site using the Update Site command. Providing a value for this setting is optional.

You can use this batch file to copy any customized files to a site when the site is being updated so the customized files do not get overwritten. The files are copied to the site's root folder. For example C:\SDx Server Files\Web_Sites\SITE1) or SPFSharedSettings folder under config service. For example C:\SDx Server Files\Web_Sites\SITE1\SDxConfigService\SDxSharedSettings).There is a single batch file for all sites in the local machine.

Before you update the site, make sure your customized files are stored in a folder outside of the site's folder.

Editing the Example Batch File

An example post process batch file is provided in Server Manager's installation folder (typically C:\Program Files (x86)\SDx\SDxServerManager). The example file is called CopyCustomizedFiles.bat.

For each site you want to include in the batch file, you must include a block of code similar to the example below. You must replace the generic site names and paths accordingly. The batch file is case insensitive.

  1. Site Name - Ensure that site name variable is a unique variable (in this example the site name variable is SiteName1). Make sure that you change the variable on both the second and third lines of code.

    Replace "mysite" with the name of your site.

  2. Set Path name - Make sure that the path variable or variables (Path1 and Path2 in this example) are unique.

    Replace "c:\TEST 1" with either:

    • The full path and the name of a customized file you want to copy. If you specify the file name, the software only copies the specified file.

    • The full path to the folder where your customized files are stored. If you specify a folder, the software copies all files in the folder to the site's root folder.

    Replace "c:\TEST 2" with either:

    • The full path and the name of a customized file you want to copy. If you specify the file name, the software only copies the specified file.

    • The full path to the folder where your customized files are stored. If you specify a folder, the software copies all files in the folder to SPFSharedSettings folder under config service.

    SHARED Tip Notice that in this example, SiteName1 corresponds to two different path variables (Path1 and Path2). You can store customized files for a site in multiple folders, and the customized files will all get copied when the site is updated.

  3. Copy files - Put your variables into the XCopy command. In this example, the variables are SiteName1, Path1 and Path2.