KB Article #181801

Temporary .bat files are not removed from the run folder

Problem

Temporary .bat files are kept in the runtime/run folder


The EOT script appears to be executed as expected but the temporary file is not removed after then


EOT script is calling Phyton code using:
D:\MyPhytonProgs\scripts\MyCFTscript.py

Resolution

When calling Phyton from a batch, to get the batch fully completed, you must be certain the Python script ends in a way it gives control back to the batch.


The issue described into that KB article was fixed after changing the call to the Phyton script in the EOT procedure as below:


start /B python D:\MyPhytonProgs\scripts\MyCFTscript.py

Instead of:

D:\MyPhytonProgs\scripts\MyCFTscript.py


For more details about the 'start' command, you can type from cmd.exe windows: help start