So I am trying to create a folder action that converts any new file with extension .mov into an mp4 using Handbrake CLI.
So what I did is this:
Anything is added to folder “xxx” (ignoring partial or changing files)
## Will execute the following actions:
*For Each Item in the Collection Execute Actions
* The contents of folder “xxx” sorted alphabetically (reversed)
### Execute the Following Actions:
* If All Conditions Met
*The variable “VarName” contains “.mov”
### Execute the Following Actions:
* Execute Shell Script
Get input from Variable “VarName”.
/Applications/HandBrakeCLI -v -i VarName -0 VarName.mp4
Stop macro and notify on failure.
but i can't get it to work - I am thinking that I am messing it up with the shell script... but I am not sure...
Keyboard Maestro sets the environment variables for the script to include all your variables, using a prefix of KMVAR_ and your variable name with spaces changed in to underscores (_). For example, your Keyboard Maestro “File Name” variable will be available as the environment variable KMVAR_File_Name.
For a simple test, first just use a simple script such as echo $KMVAR_VarName to see if you are able to print the variable value.
I have no clue what you are doing. The path did not show up in your previous macro example.
Maybe you can post more information, including sample macros with screenshots. My knowledge is very limited. If I can't help, I'm sure someone else can help.
all I am trying to achieve is this: a folder action that works when a new .mov file is added to the folder it opens the terminal (so that I can see progress) and then encodes the file from MOV to MP4 using handbrakeCLI...