I am new to perforce, I want to write batch script for copying same set files in one application to another application using p4 copy command. When I run in command prompt, commands are executed without any error. When executed through a trigger, it prompt trigger validation error? Kindly help.
Share
The absolute first rule of trigger writing is “assume nothing about the environment!”1.
Triggers are executed by the server process. Whilst a script may work locally during development/testing (via the command prompt) that is not guaranteed to be the case when the same commands are executed through a trigger.
Check your p4 environment on the server (using the p4 set command) and compare that with your local environment.
The Perforce user manual has some useful advice on writing triggers/daemons that I recommend reading.