Automation

File Execution Example

If you want to start further processes after your uploads are finished, in the templates VidUp can be configured to execute files, after each upload, after all uploads of a template are done or after all uploads are done.

When VidUp executes the configured files it passes also an argument to the executable, which contains a file path to a file with more information about the finished uploads. Care! The information files are deleted on the next start of VidUp!

Here is an example for a batch (.bat) file, which writes the argument to a file:

for /f „tokens=2 delims==“ %%a in (‚wmic OS Get localdatetime /value‘) do set „dt=%%a“
set „YY=%dt:~2,2%“ & set „YYYY=%dt:~0,4%“ & set „MM=%dt:~4,2%“ & set „DD=%dt:~6,2%“
set „HH=%dt:~8,2%“ & set „Min=%dt:~10,2%“ & set „Sec=%dt:~12,2%“ & set „MS=%dt:~15,3%“

echo %1 > args_all_%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%-%MS%.txt

The first block just sets variables with date and time information to generate a unique filename. Within this file (which is stored in the same folder as the batch file) is the filepath to the file with more information about the upload result, e.g.:

D:\Daten\Username\Documents\VidUp\automationinfo_uploadfinished_all_2023-10-11_20-00-52-448.json

The content of this files can look like this:

{
„uploadedFiles“: {
„E:\\VidUp Tests\\test4.mp4“: „Finished“,
„E:\\VidUp Tests\\test3.mkv“: „Finished“,
„E:\\VidUp Tests\\test2.mkv“: „Failed“
}
}

Or in the case it was executed after all uploads of a template were finished:

{
„templateName“: „TestTemplate“,
„uploadedFiles“: {
„E:\\VidUp Tests\\test4.mp4“: „Finished“,
„E:\\VidUp Tests\\test3.mkv“: „Finished“
}
}