I want do do a simple processing of several files with bash/Alfred file action. I am a bit embarrassed to ask, but I just don't get how to process several files. I read, Alfred passes the selected files to the workflow and I should use argv. But I searched the Forum and the web for hours, I found no example.
My script is easy as this:
ffmpeg -i sys.argv[1] -vcodec copy sys.argv[1].mp4
But apparently, this is not how it works. The Debugger says "no matches found: sys.argv[1]"
What does work, but only for single files:
ffmpeg -i {query} -vcodec copy {query}.mp4
When I run this for several files, Terminal asks me if I want to overwrite the existing file before doing anything else.
What am I missing? I know it is easy, but I could just not find an answer… Any hint appreciated!