Batch file experts in here!

Soldato
Joined
14 Apr 2003
Posts
4,950
Location
Deepest Yorkshire
I've got the following batch file which converts .avi files to .wmv for my XBox 360 using VLC. I drag a file onto the .bat file and it outputs a file in the same directory as the input file.


"c:\vlc\vlc" -vvv %1 --sout-ffmpeg-qscale 1 :sout=#transcode{vcodec=WMV2,scale=1,acodec=wma,ab=96,channels=2}:duplicate{dst=std{access=file,mux=asf,dst=%1.wmv}}

I was wondering if it would be possible instead to put the file in D:\My Videos\sourcefilename.wmv instead. I think this is something to do with the
dst=%1.wmv
part of the line except I don't know how to strip the path from the %1 and it outputs to D:\My Videos\C:\sourcelocation\sourcefilename.wmv instead which does not work.

Bonus points: If you can make it so that I can drag a load of files onto the batch file at once and have it encode them one by one... :D

cheers
Hamish
 
Back
Top Bottom