Post Convert Events

<< Click to Display Table of Contents >>

Navigation:  Batch conversions and automation > Watch Folder Mode > Configuring Watch Folder >

Post Convert Events

Post Conversion Events are designed to enhance the Watch Folder functionality. They allow you to execute a script or series of commands that are executed one by one in the same order as they were typed in the Command Line window.

For convenience, different set of commands can be carried out depending on the outcome of the conversion. If the conversion has been successful, then those from the Events on job done section will be executed. Respectively, when the conversion has failed with an error, then those from Events on error will be executed.

The commands are used exactly the same way as you are typing them at Windows Command Prompt.

The commands are executed one by one in the sequence they are entered in the dialog. If an error occurs the next commands are not executed and the conversion is considered not successful.

An error will be generated and added to the error log.

There are several parameters surrounded by "%". The available parameters and their meanings are displayed at the bottom of the window.

The example on the screenshot above demonstrates a sequence of commands to:

- copy the converted SRT file to a new location:

copy "%dest_folder%\%dest_file%.srt" "C:\Work\Test\%dest_file%.srt"

- copy a video file to the same location:

copy "C:\Work\Video\%dest_file%.mov" "C:\Work\Test\%dest_file%.mov"

- start external application to embed the subtitles and the video:

"C:\Merge\mkvmerge" -o "C:\Work\Test\%dest_file%.mkv" "C:\Work\Test\%dest_file%.mov" "C:\Work\Test\%dest_file%.srt"

- delete the files after the embedding process completes:

del "%dest_folder%\%dest_file%.srt" "C:\Work\Test\%dest_file%.mov" "C:\Work\Test\%dest_file%.srt" /q

 

The following parameters can be used which are replaced by their values:

%watch_name%

Specifies the Watch Folder name.

%src_file%

Specifies the input (source) file name without the extension and path.

%src_folder%

Specifies the full path to the folder containing the input files. The path is without trailing "\".

%dest_file%

Specifies the output (destination) file name without the extension and path.

%dest_folder%

Specifies the full path to the folder containing the output file. The path is without trailing "\".

There are some general rules to follow as well.

All paths containing spaces shall be surrounded by double quotes to ensure they will be parsed correctly by the command line.

When invoking an external application, the full path shall always be present, unless it has been added already as an Environment Variable.