Running Batch Script
-
I’m having an issue with a batch script running after a job completes. Looking at the log it is splitting the path to the file where there is a space in a folder name. I cannot change the folder name so I am wondering how I can feed the path to the .bat file in the settings? I tried adding quotation marks to the path name in the Templater Settings Dialogue box and that did not work.
Example.
My path -> C:\Users\Name\Work Folders\Folder_Folder\temp.bat
Templater sees -> “C:\Users\Name\Work” “Folders\Folder_Folder\temp.bat” and returns cannot find fileThanks
Update:
I’ve tested a different file path location and I get the same error in AE, “After Effects warning: ERROR: The system cannot find the file specified.” Is this some sort of permissions error? -
Normally, you’d only need to add quotes around the batch command for it to recognize the spaces in the path. So
“C:\Users\Name\Work Folders\Folder_Folder\temp.bat”
would be the way to format the command. If you’re still having issues, we might need to get a little more information on how everything is set up and what you’re trying to accomplish. Let us know how it goes, and we’ll take it from there. Thanks!
-
@voelz Can you please send support your
templater.log
file so we can understand a bit better? You can send to support@dataclay.comAlso, when you use the event scripts, Templater creates a temporary file in the operating systems’ temporary directory. In the case of Windows, it would be at
%TEMP%
. The file is namedtemplater-event-cmd.bat
and contains the expanded contents of what you enter into the Templater Events dialog. We have to do this for purposes of supporting UTF-8 characters in any of the expanded argument tokens.Can you please also send support the contents of that file so we can see how Templater is expanding the script.
As well, you should see the command that Templater executes in the log. Follow the steps in this knowledge base article to help you troubleshoot.
-
@Jeff I am just trying to run ffmpeg after export. The batch file works fine on it’s own, I am just having a hard time getting it to run from Templater. I’ve read all the documentation and troubleshooting. My programming knowledge is minimal, but my understanding is that Templater will execute the batch file after the Event is triggered.
@ariestav info sent to support.
-
@voelz Thanks for sending the log. Can you please send the contents of your batch script as well as the contents of the
templater-event-cmd.bat
in the%TEMP%
directory? -
@ariestav I couldn’t attach the templater-event-cmd.bat so I copied the contents into the body of the email with my batch script.