Script After Post Processor

There is often a necessity to conduct some form of file management, such as changing file names or grouping files into specific directories.

The file management may either be carried out manually or by supplying a script file that will be executed automatically once the POST has been completed.

The script file is a command file containing any shell commands. The script name is :

<Root_cad_dir>/var/post/<PPname>.cmd

You may decide whether or not to execute the script after the post by answering the appropriate question in the DFPOST section concerning output files:

11. OUTPUT FILES

   15. Run script file after post ? ................  YES/NO

Check this and change if need, save and exit.

Example of the use of a script file

In this example we will change the name of the output file to a new one. The name will be defined during the POST execution and the script will invoke the command you created during the execution.

During the POST interaction, you are asked to give a new name for the output file:

INTERACTION (character) "Name_of_out_file"  NewName   = "temp" ;

If you did change the name, we will check it in the block END OF TAPE :

*..Check if the name for the new file has been changed by the user.

IF_SET (NewName _NE_ "temp" )

PRINT0 is similar to the PRINT command. The output from print0 is always directed to a print0.txt file in the current folder. This file is invoked by the standard script file (<ppname>.cmd).

For example: copy base_circ.dir\script\tp1 temp

 PRINT0 \J "copy " PART_NAME ".dir\script\" TP_NAME " " NewName  ;

ELSE

 PRINT0 \J "copy " PART_NAME "." TP_NAME  ".script " NewName  ;

*..If you do not want to change the name.

 ELSE  

   PRINT0 \j " " ;

 END_IF ;

The script.cmd file contains the following lines:

copy print0.txt print0.bat Copy print0.txt to *.bat

call print0.bat Run print0.bat

delete print0.bat Delete unneeded files.

delete print0.txt Delete unneeded files.

In this example we have two script files, one of which is a standard script that invokes the other (print0.bat). This second script, is created during the POST execution and is specific to the execution.

Some functionality may be dependent on the product package. Contact your Reseller if you require a license.