Magic Video Project
Content Based Retrieval
WinXP and 10: Multiple File Drag/Drop Batch Files
by: (27 Jun 2017)
This example shows how to setup a batch file so that you can drag and drop multiple selected files so that an executable will process each one.
cls :LOOP rem check first argument whether it is empty rem and quit loop in case; rem `%1` is the argument as is; `%~1` removes rem surrounding quotes; rem `"%~1"` therefore ensures that the argument is rem always enclosed within quotes: if "%~1"=="" goto :END rem the argument is passed over to the command to rem execute (`"%~1"`): "ffmpeg" -i "%~1" -c:v libx265 -preset medium -crf 27 -acodec libmp3lame -b:a 192k "%~1".mkv rem `shift` makes the second argument (`%2`) to be rem the first (`%1`), the third (`%3`) to be rem the second (`%2`),...: shift rem go back to top: goto :LOOP :END pause
Media Lab Overview
ACM Digital Library