我该如何编写一个批处理文件来控制psftp,但文件名是动态的?总体来说,我试图转换一个视频文件,然后上传到我的Apple TV。这是我的代码,它通常可以工作,但命令不能控制psftp,psftp只是等待用户输入:
echo Convert and Upload to Apple TV file Called %1.mkv
ffmpeg -i %1.mkv -vcodec mpeg4 -acodec ac3 -ab 384k -sameq -s hd720 -t 60 %1.avi
psftp frontrow@192.168.1.50 -pw aaa
cd downloads/boxee
put %1.avi
quit
I know with the -b flag psftp can call it s own batch file, but I don t know how to get the %1 argument to it. I ve seen solutions where a text file is redirected to psftp, but that suffers from the same problem. Also, I d prefer to have just one file, but having to call a second file would be alright too.