Executing a batch file
Posted: Tue Jan 10, 2017 9:35 pm
Hi,
I'm sure there's a simple answer for this. I have a batch file that upon execution will remove audio from an mp4 video file using ffmpeg.
The .bat is this... for %%a in ("*.mp4") do ffmpeg -i "%%a" -acodec copy -vn "%%~na.m4a"
When i run this manually, it works without issue.
My current process is placing an mp4 file in the directory which holds this .bat file and the FFMPEG application files, and double clicking the .bat file to run.
I'd like to use the watchfolder feature of FFAStrans, to see when an mp4 file is placed inside, and run the pre-existing .bat file. That is all I need.
I've setup FFAStrans to use the Monitor Folder processer accepting *.mp4 files.
From there I've setup the Command Executor processor. This is where I'm stuck. The job doesn't produce an error, but it doesn't run the .bat file I need it to.
I've tried
%comspec% /c "C:\_Dropbox\convert\file.bat"
%comspec% /c "\file.bat"
Am I missing something? Aside from using Windows Task Scheduler to kick this off every "x minutes", I'd like to use the Monitor Folder processor to see that there's an mp4, and then kick off the .bat.
Any help would be greatly appreciated.
Thank you
I'm sure there's a simple answer for this. I have a batch file that upon execution will remove audio from an mp4 video file using ffmpeg.
The .bat is this... for %%a in ("*.mp4") do ffmpeg -i "%%a" -acodec copy -vn "%%~na.m4a"
When i run this manually, it works without issue.
My current process is placing an mp4 file in the directory which holds this .bat file and the FFMPEG application files, and double clicking the .bat file to run.
I'd like to use the watchfolder feature of FFAStrans, to see when an mp4 file is placed inside, and run the pre-existing .bat file. That is all I need.
I've setup FFAStrans to use the Monitor Folder processer accepting *.mp4 files.
From there I've setup the Command Executor processor. This is where I'm stuck. The job doesn't produce an error, but it doesn't run the .bat file I need it to.
I've tried
%comspec% /c "C:\_Dropbox\convert\file.bat"
%comspec% /c "\file.bat"
Am I missing something? Aside from using Windows Task Scheduler to kick this off every "x minutes", I'd like to use the Monitor Folder processor to see that there's an mp4, and then kick off the .bat.
Any help would be greatly appreciated.
Thank you