Code: Select all
for /f "tokens=*" %%z in ('dir /b') do (
for /f "tokens=*" %%a in ('dir /b^|find ".mp3"') do set "msc=%%a"
for /f "tokens=*" %%b in ('dir /b^|find ".avi"') do set "vid=%%b"
if "!msc!" neq "" (
if "!vid!" neq "" ("C:\Program Files\VideoLAN\VLC\vlc.exe" -f "!vid!" --input-slave="!msc!" vlc://quit) ELSE ("C:\Program Files\VideoLAN\VLC\vlc.exe" "!msc!" vlc://quit)
The problem is that some music files are in *.ogg and some video files are in *.mp4
So how can I create a find command that will search for multiple strings. I don't want to create two separate find command as each folder contains many files and this will kill the performance. Maybe this would also work, if a find is successful it terminates the other one from use.
And as a side request, does anyone knows any command line utility that can join music file with video file?